LazyPoint

package
v0.0.0-...-4336dc7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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

func (l *LazyPoint) EqualsTo(p P.Point) bool

*

  • Check if this point is the same as another point *
  • @param {Point} point
  • @returns {boolean}

func (*LazyPoint) GetAngleTo

func (l *LazyPoint) GetAngleTo(p P.Point) float64

*

  • Calculate the angle to another point *
  • @param {Point} point
  • @returns {Point}

func (*LazyPoint) GetDifferenceTo

func (l *LazyPoint) GetDifferenceTo(p P.Point) P.Point

*

  • Get the difference for x and y axis to another point *
  • @param {Point} point
  • @returns {Point}

func (*LazyPoint) GetDistanceTo

func (l *LazyPoint) GetDistanceTo(p P.Point) float64

*

  • Calculate distance to another point *
  • @param {Point} point
  • @returns {Point}

func (*LazyPoint) MoveByAngle

func (l *LazyPoint) MoveByAngle(angle, distance float64)

*

  • 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

func (*LazyPoint) ToObject

func (l *LazyPoint) ToObject() map[string]int

*

  • Return a simple object with x and y properties *
  • @returns {object}

func (*LazyPoint) Update

func (l *LazyPoint) Update(p P.Point)

*

  • Update the x and y values *
  • @param {Point} point

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL