Example #1
0
File: tops.go Project: Comdex/tasty
func capper(v float64, m model.DataModel) float64 {
	if v > m.MaxPreferenceValue() {
		v = m.MaxPreferenceValue()
	} else if v < m.MinPreferenceValue() {
		v = m.MinPreferenceValue()
	}
	return v
}