interfaces

package module
v0.0.0-...-395a174 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartesianPoint

type CartesianPoint struct {
	X, Y float64
}

CartesianPoint models a point with X and Y coordinates

func (CartesianPoint) Print

func (p CartesianPoint) Print()

Print a cartesian point

func (CartesianPoint) XCoord

func (p CartesianPoint) XCoord() float64

XCoord returns the X coordinate

func (CartesianPoint) YCoord

func (p CartesianPoint) YCoord() float64

YCoord returns the Y coordinate

type Point

type Point interface {
	Printer
	XCoord() float64
	YCoord() float64
}

Point interface represents a 2D point

type PolarPoint

type PolarPoint struct {
	R, A float64
}

PolarPoint models a point with radius and polar angle coordinates

func (PolarPoint) Print

func (p PolarPoint) Print()

Print a polar point

func (PolarPoint) XCoord

func (p PolarPoint) XCoord() float64

XCoord returns the X coordinate

func (PolarPoint) YCoord

func (p PolarPoint) YCoord() float64

YCoord returns the Y coordinate

type Printer

type Printer interface {
	Print()
}

Printer interface can print a Point

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL