Keyframe: Replace AddPoint overload w/default arg

This commit is contained in:
FeRD (Frank Dana)
2020-12-04 10:34:44 -05:00
parent cae2e7e910
commit db7bf5f622
2 changed files with 8 additions and 21 deletions

View File

@@ -29,6 +29,11 @@
*/
#include "KeyFrame.h"
#include "Exceptions.h"
#include <cassert> // For assert()
#include <iostream> // For std::cout
#include <iomanip> // For std::setprecision
#include <algorithm>
#include <functional>
#include <utility>
@@ -146,17 +151,7 @@ void Keyframe::AddPoint(Point p) {
}
}
// Add a new point on the key-frame, with some defaults set (BEZIER)
void Keyframe::AddPoint(double x, double y)
{
// Create a point
Point new_point(x, y, BEZIER);
// Add the point
AddPoint(new_point);
}
// Add a new point on the key-frame, with a specific interpolation type
// Add a new point on the key-frame, interpolate is optional (default: BEZIER)
void Keyframe::AddPoint(double x, double y, InterpolationType interpolate)
{
// Create a point