mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix documentation of Curve#getCurvatureAt(), as well as Path#getCurvatureAt() & co.
Closes #535
This commit is contained in:
parent
862867ecd2
commit
b71e2c69d6
2 changed files with 22 additions and 9 deletions
|
@ -899,7 +899,7 @@ statics: {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the point on the curve at the specified offset.
|
||||
* Calculates the point on the curve at the given offset.
|
||||
*
|
||||
* @name Curve#getPointAt
|
||||
* @function
|
||||
|
@ -911,7 +911,7 @@ statics: {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Returns the tangent vector of the curve at the specified position.
|
||||
* Calculates the tangent vector of the curve at the given offset.
|
||||
*
|
||||
* @name Curve#getTangentAt
|
||||
* @function
|
||||
|
@ -923,7 +923,7 @@ statics: {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Returns the normal vector of the curve at the specified position.
|
||||
* Calculates the normal vector of the curve at the given offset.
|
||||
*
|
||||
* @name Curve#getNormalAt
|
||||
* @function
|
||||
|
@ -935,9 +935,10 @@ statics: {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Returns the curvature vector of the curve at the specified position.
|
||||
* Curvatures indicate how sharply a curve changes direction. A straight
|
||||
* line has zero curvature where as a circle has a constant curvature.
|
||||
* Calculates the curvature of the curve at the given offset. Curvatures
|
||||
* indicate how sharply a curve changes direction. A straight line has zero
|
||||
* curvature, where as a circle has a constant curvature. The curve's radius
|
||||
* at the given offset is the reciprocal value of its curvature.
|
||||
*
|
||||
* @name Curve#getCurvatureAt
|
||||
* @function
|
||||
|
|
|
@ -1751,8 +1751,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
*/
|
||||
|
||||
/**
|
||||
* Calculates the tangent to the path at the given offset as a vector
|
||||
* point.
|
||||
* Calculates the tangent vector of the path at the given offset.
|
||||
*
|
||||
* @name Path#getTangentAt
|
||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
||||
|
@ -1822,7 +1821,7 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
*/
|
||||
|
||||
/**
|
||||
* Calculates the normal to the path at the given offset as a vector point.
|
||||
* Calculates the normal vector of the path at the given offset.
|
||||
*
|
||||
* @name Path#getNormalAt
|
||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
||||
|
@ -1891,6 +1890,19 @@ var Path = PathItem.extend(/** @lends Path# */{
|
|||
* }
|
||||
*/
|
||||
|
||||
/**
|
||||
* Calculates the curvature of the path at the given offset. Curvatures
|
||||
* indicate how sharply a path changes direction. A straight line has zero
|
||||
* curvature, where as a circle has a constant curvature. The path's radius
|
||||
* at the given offset is the reciprocal value of its curvature.
|
||||
*
|
||||
* @name Path#getCurvatureAt
|
||||
* @param {Number} offset the offset on the path, where {@code 0} is at
|
||||
* the beginning of the path and {@link Path#length} at the end.
|
||||
* @param {Boolean} [isParameter=false]
|
||||
* @return {Point} the normal vector at the given offset
|
||||
*
|
||||
|
||||
/**
|
||||
* Returns the nearest location on the path to the specified point.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue