func (mr *F32) NormVal(val float32) float32 {
	return (mr.ClipVal(val) - mr.Min) * mr.Scale()
}
NormVal normalizes value to 0-1 unit range relative to current Min / Max range
Clips the value within Min-Max range first.
package minmax
import "math"
type F32 struct {
	Min float32
	Max float32
}
func (mr *F32) Set(min, max float32) {
	mr.Min, mr.Max = min, max
}
func (mr *F32) SetInfinity() {
	mr.Min, mr.Max = math.MaxFloat32, -math.MaxFloat32
}
func (mr *F32) IsValid() bool {
	return mr.Min <= mr.Max
}
func (mr *F32) InRange(val float32) bool {
	return ((val >= mr.Min) && (val <= mr.Max))
}
func (mr *F32) IsLow(val float32) bool {
	return (val < mr.Min)
}
func (mr *F32) IsHigh(val float32) bool {
	return (val > mr.Min)
}
func (mr *F32) Range() float32 {
	return mr.Max - mr.Min
}
func (mr *F32) Scale() float32 {
	r := mr.Range()
	if r != 0 {
		return 1 / r
	}
	return 0
}
func (mr *F32) Midpoint() float32 {
	return 0.5 * (mr.Max + mr.Min)
}
func (mr *F32) FitInRange(oth F32) bool {
	adj := false
	if oth.Min < mr.Min {
		mr.Min = oth.Min
		adj = true
	}
	if oth.Max > mr.Max {
		mr.Max = oth.Max
		adj = true
	}
	return adj
}
func (mr *F32) FitValInRange(val float32) bool {
	adj := false
	if val < mr.Min {
		mr.Min = val
		adj = true
	}
	if val > mr.Max {
		mr.Max = val
		adj = true
	}
	return adj
}