Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RotateAtCenter ¶
RotateAtCenter totates a matrix on its center
Parameters:
- `renderPos`: matrix to rotate
- `rotation`: rotation in radians
- `width`: width of the sprite
- `height`: height of the sprite
- `position`: position of the sprite
Types ¶
type Vector2D ¶
type Vector2D struct {
X, Y float64
}
Vector2D represents a simple 2D vector
func (Vector2D) GetDirVector ¶
GetDirVector gets the directional vector of two vectors
func (Vector2D) GetUnitVector ¶
GetUnitVector calculates the unit vector
func (Vector2D) GetVectorLength ¶
GetVectorLength calculates the length of a given vector
Click to show internal directories.
Click to hide internal directories.