func SetMin(a, b *float64) {
	if *b < *a {
		*a = *b
	}
}
SetMin sets a to b if a > b.
package mgl64
import (
	"math"
)
var Epsilon float64 = 1e-10
func Abs(a float64) float64 {
	if a < 0 {
		return -a
	} else if a == 0 {
		return 0
	}
	return a
}
func FloatEqual(a, b float64) bool {
	return FloatEqualThreshold(a, b, Epsilon)
}
func FloatEqualFunc(epsilon float64) func(float64, float64) bool {
	return func(a, b float64) bool {
		return FloatEqualThreshold(a, b, epsilon)
	}
}
var (
	MinNormal = float64(1.1754943508222875e-38)  
	MinValue  = float64(math.SmallestNonzeroFloat64)
	MaxValue  = float64(math.MaxFloat64)
	InfPos = float64(math.Inf(1))
	InfNeg = float64(math.Inf(-1))
	NaN    = float64(math.NaN())
)
func FloatEqualThreshold(a, b, epsilon float64) 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
}
func Clamp(a, low, high float64) float64 {
	if a < low {
		return low
	} else if a > high {
		return high
	}
	return a
}
func ClampFunc(low, high float64) func(float64) float64 {
	return func(a float64) float64 {
		return Clamp(a, low, high)
	}
}
func IsClamped(a, low, high float64) bool {
	return a >= low && a <= high
}