Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of Bezier's arguments check #307

Merged
merged 1 commit into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ private static class CubicBezierInterpolator {
protected PointF b = new PointF();
protected PointF c = new PointF();

public CubicBezierInterpolator(PointF start, PointF end) throws IllegalArgumentException {
if (start.x < 0 || start.x > 1) {
throw new IllegalArgumentException("startX value must be in the range [0, 1]");
}
if (end.x < 0 || end.x > 1) {
throw new IllegalArgumentException("endX value must be in the range [0, 1]");
}
public CubicBezierInterpolator(PointF start, PointF end) {
this.start = start;
this.end = end;
}
Expand Down
4 changes: 0 additions & 4 deletions src/core/AnimatedBezier.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
}

function bezier(mX1, mY1, mX2, mY2) {
if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {
throw new Error('bezier x values must be in [0, 1] range');
}

// Precompute samples table
var sampleValues = float32ArraySupported
? new Float32Array(kSplineTableSize)
Expand Down