Documentation ¶
Index ¶
- func AbsElem(a r2.Vec) r2.Vec
- func CeilElem(a r2.Vec) r2.Vec
- func Clamp(x, a, b r2.Vec) r2.Vec
- func CosElem(a r2.Vec) r2.Vec
- func DivElem(a, b r2.Vec) r2.Vec
- func Elem(sides float64) r2.Vec
- func EqualWithin(a, b r2.Vec, tol float64) bool
- func LTEZero(a r2.Vec) bool
- func LTZero(a r2.Vec) bool
- func Max(a r2.Vec) float64
- func MaxElem(a, b r2.Vec) r2.Vec
- func Min(a r2.Vec) float64
- func MinElem(a, b r2.Vec) r2.Vec
- func MulElem(a, b r2.Vec) r2.Vec
- func NewV2(x, y float64) r2.Vec
- func Overlap(a, b r2.Vec) bool
- func PolarToXY(r, theta float64) r2.Vec
- func SinElem(a r2.Vec) r2.Vec
- type Box
- func (a Box) BottomLeft() r2.Vec
- func (a Box) Center() r2.Vec
- func (a Box) Contains(v r2.Vec) bool
- func (a Box) Enlarge(v r2.Vec) Box
- func (a Box) Equals(b Box, tol float64) bool
- func (a Box) Extend(b Box) Box
- func (a Box) Include(v r2.Vec) Box
- func (a Box) MinMaxDist2(p r2.Vec) r2.Vec
- func (b *Box) Random() r2.Vec
- func (b *Box) RandomSet(n int) Set
- func (a Box) ScaleAboutCenter(k float64) Box
- func (a Box) Size() r2.Vec
- func (a Box) TopLeft() r2.Vec
- func (a Box) Translate(v r2.Vec) Box
- func (a Box) Vertices() Set
- type Pol
- type Set
- type SortByX
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Box ¶
Box is a 2d bounding box.
func (Box) BottomLeft ¶
BottomLeft returns the bottom left corner of a 2d bounding box.
func (Box) Contains ¶
Contains checks if the 2d box contains the given vector (considering bounds as inside).
func (Box) MinMaxDist2 ¶
MinMaxDist2 returns the minimum and maximum dist * dist from a point to a box. Points within the box have minimum distance = 0.
func (Box) ScaleAboutCenter ¶
ScaleAboutCenter returns a new 2d box scaled about the center of a box.
type Pol ¶
type Pol struct {
R, Theta float64
}
func CartesianToPolar ¶
CartesianToPolar converts a cartesian to a polar coordinate.
func (Pol) PolarToCartesian ¶
PolarToCartesian converts a polar to a cartesian coordinate.
Click to show internal directories.
Click to hide internal directories.