func Clamp(a, low, high float32) float32 {
	if a < low {
		return low
	} else if a > high {
		return high
	}
	return a
}
Clamp takes in a value and two thresholds. If the value is smaller than the low
threshold, it returns the low threshold. If it's bigger than the high threshold
it returns the high threshold. Otherwise it returns the value.

Useful to prevent some functions from freaking out because a value was
teeeeechnically out of range.
package mgl32
import (
	"math"
)
var Epsilon float32 = 1e-10
func Abs(a float32) float32 {
	if a < 0 {
		return -a
	} else if a == 0 {
		return 0
	}
	return a
}
func FloatEqual(a, b float32) bool {
	return FloatEqualThreshold(a, b, Epsilon)
}
func FloatEqualFunc(epsilon float32) func(float32, float32) bool {
	return func(a, b float32) bool {
		return FloatEqualThreshold(a, b, epsilon)
	}
}
var (
	MinNormal = float32(1.1754943508222875e-38)  
	MinValue  = float32(math.SmallestNonzeroFloat32)
	MaxValue  = float32(math.MaxFloat32)
	InfPos = float32(math.Inf(1))
	InfNeg = float32(math.Inf(-1))
	NaN    = float32(math.NaN())
)
func FloatEqualThreshold(a, b, epsilon float32) bool {
	if a == b {  
		return true
	}
	diff := Abs(a - b)
	if a*b == 0 || diff < MinNormal {  
		return diff < epsilon*epsilon
	}
	return diff/(Abs(a)+Abs(b)) < epsilon
}