Read from and indexed element.
(i int)
| 68 | |
| 69 | /// Read from and indexed element. |
| 70 | func (v B2Vec2) OperatorIndexGet(i int) float64 { |
| 71 | if i == 0 { |
| 72 | return v.X |
| 73 | } |
| 74 | |
| 75 | return v.Y |
| 76 | } |
| 77 | |
| 78 | /// Write to an indexed element. |
| 79 | func (v *B2Vec2) OperatorIndexSet(i int, value float64) { |