Additional math functions object


Function
pi() As Single

Function
CLAMP(ByVal v, ByVal L, ByVal h)

Function
Lerp(ByVal v1, ByVal v2, ByVal mu)

Function
Gain(ByVal n, ByVal gamma)
'shlick gain instead of regular gamma.

Sub
ShiftRight(ByVal e As Long, ByVal v As Long)

Sub
ShiftLeft(ByVal e As Long, ByVal v As Long)

Sub
swap(ByRef v1, ByRef v2)

Function
Minimum(ByRef v1, ByRef v2)

Function
Maximum(ByRef v1, ByRef v2)

Function
Distance2(ByVal x, ByVal x2, ByVal y, ByVal y2)

Function
Distance3(ByVal x, ByVal x2, ByVal y, ByVal y2, ByVal z, ByVal z2)

Function
Cubic(t As Single, v0 As Single, v1 As Single, v2 As Single, v3 As Single)

Function
Catmull(t As Single, p1 As Single, p2 As Single, p3 As Single, p4 As Single) As Single

Function
smoothstep(ByVal a, ByVal b, ByVal x)

Sub
Saturate_triple(ByRef r, ByRef g, ByRef b)

Function
RadiansToDegrees(ByVal r)

Function
DegreesToRadians(ByVal d)

Function
GaussianFunction(a, b, C, x)
 
  'computes the Gaussian curve Function in 2d

Function
Arc(ByVal mu As Single) As Single     'Arc = Sqr(1 - mu ^ 2)

Function
RND_range(ByVal v1, ByVal v2) As Single
  
'returns a random number between a specific range.

Function
boxstep(ByVal a, ByVal b, ByVal x)

Function
Bias(ByVal a, ByVal b)

Function
IsEven(ByVal v) As Boolean

Function
sum(ParamArray nums())

Sub
Sort(ByRef MyArray, ByVal entries)

Function
Atan2(ByVal a, ByVal b)

Function
map(ByVal Value, ByVal low1, ByVal high1, ByVal low2, ByVal high2)

Function
Bezier(ByVal t, ByVal p0, ByVal p1, ByVal p2)

Function
CubicBezier(ByVal t, ByVal p0, ByVal p1, ByVal p2, ByVal p3)

Function
Bezier4(ByVal t, ByVal p0, ByVal p1, ByVal p2, ByVal p3)

Function
Cardinal(ByVal t, ByVal tension, ByVal p0, ByVal p1, ByVal p2, ByVal p3)

Function
Hermite(ByVal t, ByVal p0, ByVal p1, ByVal p2, ByVal p3)

Function
Hermite2(ByVal t, ByVal p0, ByVal p1, ByVal m0, ByVal m1)

'finds the nearest point on a line,
'Also Calculate the distance between the point and the point on the line.
Function DistToSegment(ByVal px As Single, ByVal py _
    As Single, ByVal x1 As Single, ByVal y1 As Single, _
    ByVal x2 As Single, ByVal y2 As Single, ByRef near_x As _
    Single, ByRef near_y As Single) As Single

Function
Log2(ByVal x As Single) As Single

Function
Log3(ByVal x As Single) As Single

Function
LogX(ByVal x As Single, ByVal n As Single) As Single

Function
Centimeter_to_Inches(ByVal C As Single) As Single

Function
Inches_to_Centimeters(ByVal i As Single) As Single

Function
Meters_To_Feet(ByVal m As Single) As Single

Function
Feet_To_Meters(ByVal F As Single) As Single

Function
Meters_To_Yards(ByVal m As Single) As Single

Function
Yards_To_Meters(ByVal y As Single) As Single

Function
Kilometers_To_Miles(ByVal k As Single) As Single

Function
Miles_To_Kilometers(ByVal m As Single) As Single

Function
Prime(ByVal n As Single) As Single

Function
Celsius_To_Fahrenheit(ByVal C As Single) As Single

Function
Fahrenheit_To_Celsius(ByVal F As Single) As Single