Use new @operator tag to mark math operator methods.

This commit is contained in:
Jürg Lehni 2013-06-28 05:59:07 -07:00
parent 8f985a7eda
commit 8f254202e8
4 changed files with 21 additions and 2 deletions

View file

@ -245,6 +245,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#add * @name Point#add
* @function * @function
* @operator
* @param {Number} number the number to add * @param {Number} number the number to add
* @return {Point} the addition of the point and the value as a new point * @return {Point} the addition of the point and the value as a new point
* *
@ -260,6 +261,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#add * @name Point#add
* @function * @function
* @operator
* @param {Point} point the point to add * @param {Point} point the point to add
* @return {Point} the addition of the two points as a new point * @return {Point} the addition of the two points as a new point
* *
@ -281,6 +283,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#subtract * @name Point#subtract
* @function * @function
* @operator
* @param {Number} number the number to subtract * @param {Number} number the number to subtract
* @return {Point} the subtraction of the point and the value as a new point * @return {Point} the subtraction of the point and the value as a new point
* *
@ -296,6 +299,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#subtract * @name Point#subtract
* @function * @function
* @operator
* @param {Point} point the point to subtract * @param {Point} point the point to subtract
* @return {Point} the subtraction of the two points as a new point * @return {Point} the subtraction of the two points as a new point
* *
@ -317,6 +321,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#multiply * @name Point#multiply
* @function * @function
* @operator
* @param {Number} number the number to multiply by * @param {Number} number the number to multiply by
* @return {Point} the multiplication of the point and the value as a new point * @return {Point} the multiplication of the point and the value as a new point
* *
@ -332,6 +337,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#multiply * @name Point#multiply
* @function * @function
* @operator
* @param {Point} point the point to multiply by * @param {Point} point the point to multiply by
* @return {Point} the multiplication of the two points as a new point * @return {Point} the multiplication of the two points as a new point
* *
@ -353,6 +359,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#divide * @name Point#divide
* @function * @function
* @operator
* @param {Number} number the number to divide by * @param {Number} number the number to divide by
* @return {Point} the division of the point and the value as a new point * @return {Point} the division of the point and the value as a new point
* *
@ -368,6 +375,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#divide * @name Point#divide
* @function * @function
* @operator
* @param {Point} point the point to divide by * @param {Point} point the point to divide by
* @return {Point} the division of the two points as a new point * @return {Point} the division of the two points as a new point
* *
@ -388,6 +396,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#modulo * @name Point#modulo
* @function * @function
* @operator
* @param {Number} value * @param {Number} value
* @return {Point} the integer remainders of dividing the point by the value * @return {Point} the integer remainders of dividing the point by the value
* as a new point * as a new point
@ -402,6 +411,7 @@ var Point = Base.extend(/** @lends Point# */{
* *
* @name Point#modulo * @name Point#modulo
* @function * @function
* @operator
* @param {Point} point * @param {Point} point
* @return {Point} the integer remainders of dividing the points by each * @return {Point} the integer remainders of dividing the points by each
* other as a new point * other as a new point

View file

@ -193,6 +193,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#add * @name Size#add
* @function * @function
* @operator
* @param {Number} number the number to add * @param {Number} number the number to add
* @return {Size} the addition of the size and the value as a new size * @return {Size} the addition of the size and the value as a new size
* *
@ -207,6 +208,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#add * @name Size#add
* @function * @function
* @operator
* @param {Size} size the size to add * @param {Size} size the size to add
* @return {Size} the addition of the two sizes as a new size * @return {Size} the addition of the two sizes as a new size
* *
@ -228,6 +230,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#subtract * @name Size#subtract
* @function * @function
* @operator
* @param {Number} number the number to subtract * @param {Number} number the number to subtract
* @return {Size} the subtraction of the size and the value as a new size * @return {Size} the subtraction of the size and the value as a new size
* *
@ -242,6 +245,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#subtract * @name Size#subtract
* @function * @function
* @operator
* @param {Size} size the size to subtract * @param {Size} size the size to subtract
* @return {Size} the subtraction of the two sizes as a new size * @return {Size} the subtraction of the two sizes as a new size
* *
@ -262,6 +266,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#multiply * @name Size#multiply
* @function * @function
* @operator
* @param {Number} number the number to multiply by * @param {Number} number the number to multiply by
* @return {Size} the multiplication of the size and the value as a new size * @return {Size} the multiplication of the size and the value as a new size
* *
@ -276,6 +281,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#multiply * @name Size#multiply
* @function * @function
* @operator
* @param {Size} size the size to multiply by * @param {Size} size the size to multiply by
* @return {Size} the multiplication of the two sizes as a new size * @return {Size} the multiplication of the two sizes as a new size
* *
@ -296,6 +302,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#divide * @name Size#divide
* @function * @function
* @operator
* @param {Number} number the number to divide by * @param {Number} number the number to divide by
* @return {Size} the division of the size and the value as a new size * @return {Size} the division of the size and the value as a new size
* *
@ -310,6 +317,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#divide * @name Size#divide
* @function * @function
* @operator
* @param {Size} size the size to divide by * @param {Size} size the size to divide by
* @return {Size} the division of the two sizes as a new size * @return {Size} the division of the two sizes as a new size
* *
@ -330,6 +338,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#modulo * @name Size#modulo
* @function * @function
* @operator
* @param {Number} value * @param {Number} value
* @return {Size} the integer remainders of dividing the size by the value * @return {Size} the integer remainders of dividing the size by the value
* as a new size * as a new size
@ -344,6 +353,7 @@ var Size = Base.extend(/** @lends Size# */{
* *
* @name Size#modulo * @name Size#modulo
* @function * @function
* @operator
* @param {Size} size * @param {Size} size
* @return {Size} the integer remainders of dividing the sizes by each * @return {Size} the integer remainders of dividing the sizes by each
* other as a new size * other as a new size

View file

@ -47,7 +47,7 @@ paper.PaperScope.prototype.PaperScript = new function() {
'+': null '+': null
}; };
// Add hidden math functions to Point, Size and Color // Add hidden math functions to Point, Size and Color.
var fields = Base.each( var fields = Base.each(
'add,subtract,multiply,divide,modulo,negate'.split(','), 'add,subtract,multiply,divide,modulo,negate'.split(','),
function(name) { function(name) {

View file

@ -412,7 +412,6 @@ var Path = PathItem.extend(/** @lends Path# */{
* @param {Segment|Point} segment the segment or point to be added. * @param {Segment|Point} segment the segment or point to be added.
* @return {Segment} the added segment. This is not necessarily the same * @return {Segment} the added segment. This is not necessarily the same
* object, e.g. if the segment to be added already belongs to another path. * object, e.g. if the segment to be added already belongs to another path.
* @operator none
* *
* @example {@paperscript} * @example {@paperscript}
* // Adding segments to a path using point objects: * // Adding segments to a path using point objects: