Documentation ¶
Index ¶
- Constants
- func Clamp(f, min, max float64) float64
- func Linspace(start, stop float64, num int, endPoint bool) []float64
- func SmoothDamp(current, target float64, currentVelocity *float64, ...) float64
- func SmoothDampMaxSpeed(current, target float64, currentVelocity *float64, ...) float64
- func ToDegrees180(r float64) float64
- func ToDegrees90(r float64) float64
- func ToRadians180(d float64) float64
- func ToRadians90(d float64) float64
Constants ¶
const DegreesMeasurement180 = 180 / math.Pi
Used to convert Degress value to Radians. Formula: Radians = Radians * DegreesMeasurement180.
: 180/π
const DegreesMeasurement90 = 90 / math.Pi
Used to convert Radians value to Degrees. Formula: Radians = Radians * DegreesMeasurement90.
: 90/π
const Epsilon = 0.00001
const RadiansMeasurement180 = math.Pi / 180
Used to convert Degress value to Radians. Formula: Radians = Degress * RadiansMeasurement180.
: π/180
const RadiansMeasurement90 = math.Pi / 90
Used to convert Degress value to Radians. Formula: Radians = Degress * RadiansMeasurement90.
: π/90
Variables ¶
This section is empty.
Functions ¶
func SmoothDamp ¶
func SmoothDamp(current, target float64, currentVelocity *float64, smoothTime, deltaTime float64) float64
Analog of Unity's Mathf.SmoothDampAngle(). This function references to SmoothDampMaxSpeed with max speed = math.Inf(1) (positive infinity).
func SmoothDampMaxSpeed ¶
func SmoothDampMaxSpeed(current, target float64, currentVelocity *float64, smoothTime, deltaTime, maxSpeed float64) float64
Analog of Unity's Mathf.SmoothDampAngle().
func ToDegrees180 ¶
Converts the radians angle to the degrees using 180/π.
func ToDegrees90 ¶
Converts the radians angle to the degrees using 90/π.
func ToRadians180 ¶
Converts the degrees angle to the radians using π/180.
func ToRadians90 ¶
Converts the degrees angle to the radians using π/90.
Types ¶
This section is empty.