Versions in this module Expand all Collapse all v1 v1.0.3 Nov 20, 2022 v1.0.2 Nov 20, 2022 v1.0.1 Nov 20, 2022 v1.0.0 Nov 20, 2022 Changes in this version + func Absi32(n int32) int32 + func Absi64(n int64) int64 + func Isqrt32(square int32) int32 + func Isqrt64(square int64) uint32 + func Square2(p1, p2 []int32) int64 + func Square3(p1, p2 []int32) int64 + type ABRect2 struct + P1 Point2 + P2 Point2 + type ABRect3 struct + P1 Point3 + P2 Point3 + type Circle struct + Centre Point2 + Radius int32 + func (this *Circle) AddRadius(added int32) *Circle + func (this *Circle) CrsLine(pt1, pt2 *Point2) bool + func (this *Circle) CrsPoint(pt *Point2) bool + type Convex2 struct + Vertex [4]*Point2 + func (this *Convex2) CrsCircle(cc *Circle) bool + type Dir2 struct + Mlongitude uint16 + func Arctan2(src *Point2, dest *Point2) Dir2 + func Invd2() Dir2 + func NewDir2(longitude uint16) *Dir2 + func NewDir2p(prot uint32) *Dir2 + func (dir Dir2) Dir2Vec(veclen int32) *Vector2 + func (this *Dir2) Set(longitude uint16) + func (this *Dir2) UnMarshal(prot uint32) + func (this Dir2) Add(longitude int16) Dir2 + func (this Dir2) Between(dir Dir2, half uint16) bool + func (this Dir2) Marshal() *uint32 + func (this Dir2) To3d(latitude uint8) Dir3 + type Dir3 struct + Mlatitude uint8 + func Arctan3(src *Point3, dest *Point3) Dir3 + func Invd3() Dir3 + func NewDir3(longitude uint16, latitude uint8) *Dir3 + func NewDir3p(prot uint32) *Dir3 + func (dir Dir3) Dir2Vec(veclen int32) *Vector3 + func (this *Dir3) Set(longitude uint16, latitude uint8) + func (this *Dir3) UnMarshal(prot uint32) + func (this Dir3) Between(dir Dir3, half1 uint16, half2 uint8) bool + func (this Dir3) Marshal() *uint32 + func (this Dir3) To2d() Dir2 + type Line2 struct + Vertex [2]Point2 + func (this *Line2) CrsCircle(cc *Circle) bool + type Point2 struct + X int32 + Y int32 + func Invp2() Point2 + func Move2p(p Point2, dir Dir2, distance int32) Point2 + func MoveBySpd2(dir Dir2, MOV_SPD_PS int32, timesize_ms int32) (delta *Point2) + func NewPoint2(x, y int32) *Point2 + func NewPoint2p(prot []int32) *Point2 + func (src *Point2) P2pVec(dst *Point2) *Vector2 + func (this *Point2) Equal(other *Point2) bool + func (this *Point2) InRect2(r *ABRect2) bool + func (this *Point2) Len() int16 + func (this *Point2) Marshal() []int32 + func (this *Point2) Move(dir Dir2, distance int32) + func (this *Point2) MoveBySpd(dir Dir2, MOV_SPD_PS int32, timesize_ms int32) *Point2 + func (this *Point2) MoveRatio(dst *Point2, molec, denom int64) + func (this *Point2) Set(x, y int32) + func (this *Point2) Setidx(idx int16, v int32) + func (this *Point2) Square(other *Point2) int64 + func (this *Point2) To3d(z int32) *Point3 + func (this *Point2) UnMarshal(prot []int32) + type Point3 struct + Z int32 + func Invp3() Point3 + func Move3p(p Point3, dir Dir3, distance int32) Point3 + func MoveBySpd3(dir Dir3, MOV_SPD_PS int32, timesize_ms int32) (delta *Point3) + func NewPoint3(x, y, z int32) *Point3 + func NewPoint3p(prot []int32) *Point3 + func (src *Point3) P2pVec(dst *Point3) *Vector3 + func (this *Point3) Equal(other *Point3) bool + func (this *Point3) InRect3(r *ABRect3) bool + func (this *Point3) Len() int16 + func (this *Point3) Marshal() []int32 + func (this *Point3) Move(dir Dir3, distance int32) + func (this *Point3) MoveBySpd(dir Dir3, MOV_SPD_PS int32, timesize_ms int32) *Point3 + func (this *Point3) MoveRatio(dst *Point3, molec, denom int64) + func (this *Point3) Set(x, y, z int32) + func (this *Point3) Setidx(idx int16, v int32) + func (this *Point3) Square(other *Point3) int64 + func (this *Point3) To2d() *Point2 + func (this *Point3) UnMarshal(prot []int32) + type Rect2 struct + CentDir Dir2 + Centre Point2 + Length int32 + Width int32 + func (this *Rect2) CrsCircle(cc *Circle) bool + type Sector struct + CentDir Dir2 + Centre Point2 + HalfAngle int16 + Radius int32 + func (this *Sector) CrsCircle(cc *Circle) bool + func (this *Sector) CrsPoint(pt *Point2) bool + type Triangle2 struct + Vertex [3]Point2 + func (this *Triangle2) CrsCircle(cc *Circle) bool + func (this *Triangle2) CrsPoint(pt *Point2) bool + type Vector2 Point2 + func (this *Vector2) Add(o *Vector2) *Vector2 + func (this *Vector2) AngleVs180(o *Vector2) int + func (this *Vector2) AngleVs90(o *Vector2) int + func (this *Vector2) CrsMult() *Vector2 + func (this *Vector2) DotMult(o *Vector2) int64 + func (this *Vector2) Move(duration_ms int64, MOV_SPD_PS int64) (delta *Vector2) + func (this *Vector2) NumMult(n, m int32) *Vector2 + func (this *Vector2) RevsDir() *Vector2 + func (this *Vector2) Scale(newlen int32) *Vector2 + func (this *Vector2) Square() int64 + func (this *Vector2) Sub(o *Vector2) *Vector2 + func (this *Vector2) To3d(z int32) *Vector3 + func (this *Vector2) Vec2Dir() Dir2 + type Vector3 Point3 + func (this *Vector3) Add(o *Vector3) *Vector3 + func (this *Vector3) AngleVs90(o *Vector3) int + func (this *Vector3) CrsMult(o *Vector3) *Vector3 + func (this *Vector3) DotMult(o *Vector3) int64 + func (this *Vector3) Move(duration_ms int64, MOV_SPD_PS int64) (delta *Vector3) + func (this *Vector3) NumMult(n, m int32) *Vector3 + func (this *Vector3) RevsDir() *Vector3 + func (this *Vector3) Scale(newlen int32) *Vector3 + func (this *Vector3) Square() int64 + func (this *Vector3) Sub(o *Vector3) *Vector3 + func (this *Vector3) To2d() *Vector2 + func (this *Vector3) Vec2Dir() Dir3