package
0.0.0-20231019115643-d76522940a9b
Repository: https://github.com/alacrity-engine/core.git
Documentation: pkg.go.dev

# Functions

AdjustAngle adjusts the value of the angle so it is bettween 0 and 360.
AlacrityVectorToGonumVG converts Vec to vg.Point (from gonum/plot).
C returns a new Circle with the given radius and center coordinates.
CirnoVectorToGonumVG converts cirno.Vector to vg.Point (from gonum/plot).
Clamp returns x clamped to the interval [min, max].
ClampMagnitude clamps the vector to the specified magnitude if its length exceeds it.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetSegmentPoints returns the points of the equally segmented curve.
GonumVGToAlacrityVector converts vg.Point (from gonum/plot) to pixel.Vec.
GonumVGToCirnoVector converts vg.Point (from gonum/plot) to cirno.Vector.
L creates and returns a new Line.
Lerp returns a linear interpolation between vectors a and b.
NewTransform creates a new empty transform out of given data.
Astroid creates a new astroid consisting of points.
BezierCurve returns a new Bezier curve consisting of equidistant points.
Circle creates a new circle consisting of points.
Ellipse creates a new ellipse consisting of points.
Line returns a new line consisting of equidistant points.
R returns a new Rect with given the Min and Max coordinates.
Unit returns a vector of length 1 facing the given angle.
V returns a new 2D vector with the given coordinates.
VectorAlacrityToCirno converts pixel.Vec to cirno.Vector.
VectorCirnoToAlacrity converts cirno.Vector to Vec.

# Constants

DegToRad is a factor to transform degrees to radians.
Epsilon is a number for float comparison.
RadToDeg is a factor to transfrom radians to degrees.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ZR is a zero rectangle.
ZV is a zero vector.

# Structs

Circle is a 2D circle.
Line is a 2D line segment, between points A and B.
Rect is a 2D rectangle aligned with the axes of the coordinate system.
Transform stores position, angle and scale of the game object.
Vec is a 2D vector type with X and Y coordinates.

# Type aliases

Anchor is a vector used to define anchors, such as `Center`, `Top`, `TopRight`, etc.