Class AstarMath
Public
Utility functions for working with numbers and strings.
Public Static Methods
DeltaAngle
(angle1, angle2)
Calculates the shortest difference between two given angles given in radians.
Public
Static
FormatBytesBinary
(bytes)
Returns a nicely formatted string for the number of bytes (KiB, MiB, GiB etc).
Public
Static
HSVToRGB
(h, s, v)
Converts an HSV color to an RGB color.
Public
Static
IntToColor
(i, a)
Returns a nice color from int i with alpha a.
Public
Static
MapTo
(startMin, startMax, targetMin, targetMax, value)
Maps a value between startMin and startMax to be between targetMin and targetMax.
Public
Static
SaturatingConvertFloatToLong
(v)
Converts a non-negative float to a long, saturating at long.MaxValue if the value is too large.
Public
Static
Private/Protected Members
Bit
(a, b)
Returns bit number b from int a.
Private
Static