Skip to content

Commit

Permalink
Merge branch 'master' of github.com:davidaurelio/css-beziers
Browse files Browse the repository at this point in the history
  • Loading branch information
David Aurelio committed Mar 3, 2010
2 parents 6a2c9e7 + 2c79d61 commit 8cba09f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/css-beziers.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
* This type of bezier curves can be used as CSS transform timing functions.
*/
function CubicBezier(p1x, p1y, p2x, p2y){
if (!(p1x >= 0) || !(p1x <= 1)) {
if (!(p1x >= 0 && p1x <= 1)) {
throw new RangeError("'p1x' must be a number between 0 and 1");
}
if (!(p1y >= 0) || !(p1y <= 1)) {
if (!(p1y >= 0 && p1y <= 1)) {
throw new RangeError("'p1y' must be a number between 0 and 1");
}
if (!(p2x >= 0) || !(p2x <= 1)) {
if (!(p2x >= 0 && p2x <= 1)) {
throw new RangeError("'p2x' must be a number between 0 and 1");
}
if (!(p2y >= 0) || !(p2y <= 1)) {
if (!(p2y >= 0 && p2y <= 1)) {
throw new RangeError("'p2y' must be a number between 0 and 1");
}

Expand All @@ -62,6 +62,14 @@ function CubicBezier(p1x, p1y, p2x, p2y){
};
}

CubicBezier.prototype.getTforX = function(x){

};

CubicBezier.prototype.getTforY = function(y){

};

/**
* Computes the point for a given t value.
*
Expand Down

0 comments on commit 8cba09f

Please sign in to comment.