Documentation ¶
Index ¶
- type LazyPoint
- func (l *LazyPoint) EqualsTo(p P.Point) bool
- func (l *LazyPoint) GetAngleTo(p P.Point) float64
- func (l *LazyPoint) GetDifferenceTo(p P.Point) P.Point
- func (l *LazyPoint) GetDistanceTo(p P.Point) float64
- func (l *LazyPoint) MoveByAngle(angle, distance float64)
- func (l *LazyPoint) ToObject() map[string]int
- func (l *LazyPoint) Update(p P.Point)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LazyPoint ¶
type LazyPoint struct {
X, Y float64
}
func (*LazyPoint) EqualsTo ¶
*
- Check if this point is the same as another point *
- @param {Point} point
- @returns {boolean}
func (*LazyPoint) GetAngleTo ¶
*
- Calculate the angle to another point *
- @param {Point} point
- @returns {Point}
func (*LazyPoint) GetDifferenceTo ¶
*
- Get the difference for x and y axis to another point *
- @param {Point} point
- @returns {Point}
func (*LazyPoint) GetDistanceTo ¶
*
- Calculate distance to another point *
- @param {Point} point
- @returns {Point}
func (*LazyPoint) MoveByAngle ¶
*
- Move the point to another position using an angle and distance *
- @param {number} angle The angle in radians
- @param {number} distance How much the point should be moved
Click to show internal directories.
Click to hide internal directories.