mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Point documentation: add types to bean properties.
This commit is contained in:
parent
ef184db13a
commit
85d4af5154
1 changed files with 5 additions and 0 deletions
|
@ -30,10 +30,12 @@ var Point = this.Point = Base.extend({
|
|||
if (arg1 !== undefined) {
|
||||
/**
|
||||
* The x coordinate of the point
|
||||
* @type number
|
||||
*/
|
||||
this.x = arg0;
|
||||
/**
|
||||
* The y coordinate of the point
|
||||
* @type number
|
||||
*/
|
||||
this.y = arg1;
|
||||
} else if (arg0 !== undefined) {
|
||||
|
@ -126,6 +128,7 @@ var Point = this.Point = Base.extend({
|
|||
* Each point can be interpreted as a vector that points from the origin
|
||||
* ({@code x = 0},{@code y = 0}) to the point's location.
|
||||
* Setting the length changes the location but keeps the vector's angle.
|
||||
* @type number
|
||||
* @bean
|
||||
*/
|
||||
getLength: function() {
|
||||
|
@ -170,6 +173,7 @@ var Point = this.Point = Base.extend({
|
|||
return this.x >= 0 ? this.y >= 0 ? 1 : 4 : this.y >= 0 ? 2 : 3;
|
||||
},
|
||||
|
||||
// DOCS: document function with point argument.
|
||||
/**
|
||||
* The vector's angle, measured from the x-axis to the vector.
|
||||
*
|
||||
|
@ -178,6 +182,7 @@ var Point = this.Point = Base.extend({
|
|||
* direction is given.
|
||||
*
|
||||
* @param {Point} point
|
||||
* @type number
|
||||
* @bean
|
||||
*/
|
||||
getAngle: function(/* point */) {
|
||||
|
|
Loading…
Reference in a new issue