PathDataNextRel gets the next 2 path data points as a relative vector and returns that relative vector added to current point
(data []PathData, i *int, cp math32.Vector2)
| 237 | // PathDataNextRel gets the next 2 path data points as a relative vector |
| 238 | // and returns that relative vector added to current point |
| 239 | func PathDataNextRel(data []PathData, i *int, cp math32.Vector2) math32.Vector2 { |
| 240 | v := math32.Vector2{} |
| 241 | v.X = float32(data[*i]) |
| 242 | (*i)++ |
| 243 | v.Y = float32(data[*i]) |
| 244 | (*i)++ |
| 245 | return v.Add(cp) |
| 246 | } |
| 247 | |
| 248 | // PathDataNextCmd gets the next path data command, incrementing the index -- ++ |
| 249 | // not an expression so its clunky |
no test coverage detected