Refactoring

This commit is contained in:
Isaac 2024-05-18 18:40:24 +04:00
parent 8e43e26415
commit ca50ed466a
2 changed files with 2 additions and 2 deletions

View file

@ -370,7 +370,7 @@ inline bool isInRange(double value, double from, double to) {
return from < value && value < to;
}
double cubicBezierInterpolate(double value, Vector2D const &P0, Vector2D const &P1, Vector2D const &P2, Vector2D const &P3);
float cubicBezierInterpolate(float value, Vector2D const &P0, Vector2D const &P1, Vector2D const &P2, Vector2D const &P3);
}

View file

@ -254,7 +254,7 @@ static double SolveCubic(double a, double b, double c, double d) {
return -1;
}
double cubicBezierInterpolate(double value, Vector2D const &P0, Vector2D const &P1, Vector2D const &P2, Vector2D const &P3) {
float cubicBezierInterpolate(float value, Vector2D const &P0, Vector2D const &P1, Vector2D const &P2, Vector2D const &P3) {
double t = 0.0;
if (value == P0.x) {
// Handle corner cases explicitly to prevent rounding errors