Skip to content

Commit

Permalink
Jeddic#6 Clean up the curve builder javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
richardTingle committed Dec 18, 2021
1 parent 5f96488 commit 5a65fba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public CurveBuilderAtAnchor anchorPoint(float x, float y){
*/
public CurveBuilderAtAnchor anchorPoint(Vector2f nextAnchor ){
//no checkReuse() as the call to controlPoint1 will do that
//simulate a straight line using a Bézier curve
//simulate a straight line using a Bézier-like curve
Vector2f midOne = currentAnchor.mult(2f/3).add(nextAnchor.mult(1f/3));
Vector2f midTwo = currentAnchor.mult(1f/3).add(nextAnchor.mult(2f/3));
return controlPoint1(midOne).controlPoint2(midTwo).anchorPoint(nextAnchor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public CurveBuilderAtControlPoint1(Curve curveBeingBuilt, Vector2f controlPointI
}

/**
* Adds a point that the curve will attempt to move towards but may not actually touch.
* Adds a point that the curve will attempt to move towards (but may not actually touch).
*
* The 2 control points are used to define a cubic Bézier curve between 2 anchors
* The 2 control points are used to define a cubic Bézier-like curve between 2 anchors
* @param x the control point's x
* @param y the control point's y
* @return a CurveBuilderAtControlPoint1 a part of the curve builder system
Expand All @@ -27,7 +27,7 @@ public CurveBuilderAtControlPoint2 controlPoint2( float x, float y ){
/**
* Adds a point that the curve will attempt to move towards (but may not actually touch).
*
* The 2 control points are used to define a cubic Bézier curve between 2 anchors
* The 2 control points are used to define a cubic Bézier-like curve between 2 anchors
* @param nextControlPoint the control point
* @return a CurveBuilderAtControlPoint1 a part of the curve builder system
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public CurveBuilderAtControlPoint2(Curve curveBeingBuilt, Vector2f inControlPoin
/**
* Adds a point that the curve go through.
*
* Anchors are the starts and ends of cubic Bézier curves
* Anchors are the starts and ends of cubic Bézier-like curves
* @param x the anchor point's x
* @param y the anchor point's y
* @return a CurveBuilderAtAnchor a part of the curve builder system
Expand All @@ -26,9 +26,9 @@ public CurveBuilderAtAnchor anchorPoint(float x, float y){
}

/**
* Adds a point that the curve go through.
* Adds a point that the curve will go through.
*
* Anchors are the starts and ends of cubic Bézier curves
* Anchors are the starts and ends of cubic Bézier-like curves
* @param nextAnchor the anchor point
* @return a CurveBuilderAtAnchor a part of the curve builder system
*/
Expand Down

0 comments on commit 5a65fba

Please sign in to comment.