Get previous point (if any)
| 224 | |
| 225 | // Get previous point (if any) |
| 226 | Point Keyframe::GetPreviousPoint(Point p) const { |
| 227 | |
| 228 | // Lookup the index of this point |
| 229 | try { |
| 230 | int64_t index = FindIndex(p); |
| 231 | |
| 232 | // If not the 1st point |
| 233 | if (index > 0) |
| 234 | return Points[index - 1]; |
| 235 | else |
| 236 | return Points[0]; |
| 237 | |
| 238 | } catch (const OutOfBoundsPoint& e) { |
| 239 | // No previous point |
| 240 | return Point(-1, -1); |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | // Get max point (by Y coordinate) |
| 245 | Point Keyframe::GetMaxPoint() const { |
no test coverage detected