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.

HSVToRGB (h, s, v)

Converts an HSV color to an RGB color.

IntToColor (i, a)

Returns a nice color from int i with alpha a.

MapTo (startMin, startMax, targetMin, targetMax, value)

Maps a value between startMin and startMax to be between targetMin and targetMax.

Converts a non-negative float to a long, saturating at long.MaxValue if the value is too large.

Private/Protected Members

Bit (a, b)

Returns bit number b from int a.

GlobalRandom
Private Static
GlobalRandomLock
Private Static