Versions in this module Expand all Collapse all v1 v1.1.2 Apr 20, 2021 v1.1.1 Apr 20, 2021 v1.1.0 Apr 20, 2021 v1.0.9 Apr 19, 2021 v1.0.8 Apr 19, 2021 v1.0.7 Apr 14, 2021 v1.0.6 Mar 30, 2021 v1.0.5 Mar 30, 2021 v0 v0.2.6 Apr 25, 2021 v0.2.5 Apr 21, 2021 v0.2.4 Apr 21, 2021 v0.2.3 Apr 21, 2021 v0.2.2 Apr 20, 2021 v0.2.1 Apr 20, 2021 Changes in this version + func GetVecAngle(a, b *Vector) float64 + func IntMax(x, y int) int + func IntMin(x, y int) int + type Circle struct + Center Point + Radius int + func NewCircle(center Point, radius int) Circle + func (c *Circle) CrossPoint(point Point) Point + func (c *Circle) SurroundRect() Rectangle + type Point struct + X int + Y int + func NewPoint(x, y int) *Point + func (a *Point) Distance(b *Point) float64 + func (a *Point) Equal(b *Point) bool + type Rectangle struct + Height int + Width int + func NewRectangle(x, y, w, h int) Rectangle + func RectIntersect(a *Rectangle, b *Rectangle) Rectangle + func RectUnion(a *Rectangle, b *Rectangle) Rectangle + func (r *Rectangle) Contains(x, y int) bool + func (r *Rectangle) ContainsPoint(pt Point) bool + func (r *Rectangle) ContainsRegion(rec *Rectangle) bool + func (r *Rectangle) GetVertexes() [4]Point + func (r *Rectangle) Inflate(width, height int) + func (r *Rectangle) IsIntersectsWith(rec *Rectangle) bool + type Vector struct + X int + Y int + func NewVectorFrom(a, b Point) Vector + func (a *Vector) Add(b *Vector) Vector + func (a *Vector) Cross(b *Vector) int64 + func (a *Vector) Dot(b *Vector) int64 + func (a *Vector) Length() float64 + func (a *Vector) Mul(m float64) Vector + func (a *Vector) Normalize() Vector + func (a *Vector) Rotate(angle float64) Vector + func (a *Vector) Sub(b *Vector) Vector + func (a *Vector) Trunc(ratio float64) Vector + func (a Vector) ToPoint(start Point) Point