Value returns the value of an Axis.
()
| 10 | |
| 11 | // Value returns the value of an Axis. |
| 12 | func (a Axis) Value() float32 { |
| 13 | for _, pair := range a.Pairs { |
| 14 | v := pair.Value() |
| 15 | if v != AxisNeutral { |
| 16 | return v |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | return AxisNeutral |
| 21 | } |
| 22 | |
| 23 | // An AxisPair is a set of Min/Max values which could possible be used by an Axis. |
| 24 | type AxisPair interface { |