Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CircleCollide ¶
CircleCollide returns true if c0 and c1 overlap, the padding is applied only once
func V2Distance ¶
V2Distance calculates the distance between V2 points in space
Types ¶
type Circle ¶
Circle represents a cirle that can be drawn on a canvas
func (*Circle) Collides ¶
Collides returns true if the target circle overlaps with any of the circles provided
func (*Circle) NewSubCircle ¶
func (c *Circle) NewSubCircle(radius float64, maxTries int, success func(*Circle) bool) (*Circle, bool)
NewSubCircle generates a new circle with the given radius that passes the success function. It will randomly generate sub circles within the radius of the circle until it fails maxTries times at which point it will return (nil, false)
Click to show internal directories.
Click to hide internal directories.