Skip to content

Commit 8f25420

Browse files
committed
Use new @operator tag to mark math operator methods.
1 parent 8f985a7 commit 8f25420

4 files changed

Lines changed: 21 additions & 2 deletions

File tree

src/basic/Point.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ var Point = Base.extend(/** @lends Point# */{
245245
*
246246
* @name Point#add
247247
* @function
248+
* @operator
248249
* @param {Number} number the number to add
249250
* @return {Point} the addition of the point and the value as a new point
250251
*
@@ -260,6 +261,7 @@ var Point = Base.extend(/** @lends Point# */{
260261
*
261262
* @name Point#add
262263
* @function
264+
* @operator
263265
* @param {Point} point the point to add
264266
* @return {Point} the addition of the two points as a new point
265267
*
@@ -281,6 +283,7 @@ var Point = Base.extend(/** @lends Point# */{
281283
*
282284
* @name Point#subtract
283285
* @function
286+
* @operator
284287
* @param {Number} number the number to subtract
285288
* @return {Point} the subtraction of the point and the value as a new point
286289
*
@@ -296,6 +299,7 @@ var Point = Base.extend(/** @lends Point# */{
296299
*
297300
* @name Point#subtract
298301
* @function
302+
* @operator
299303
* @param {Point} point the point to subtract
300304
* @return {Point} the subtraction of the two points as a new point
301305
*
@@ -317,6 +321,7 @@ var Point = Base.extend(/** @lends Point# */{
317321
*
318322
* @name Point#multiply
319323
* @function
324+
* @operator
320325
* @param {Number} number the number to multiply by
321326
* @return {Point} the multiplication of the point and the value as a new point
322327
*
@@ -332,6 +337,7 @@ var Point = Base.extend(/** @lends Point# */{
332337
*
333338
* @name Point#multiply
334339
* @function
340+
* @operator
335341
* @param {Point} point the point to multiply by
336342
* @return {Point} the multiplication of the two points as a new point
337343
*
@@ -353,6 +359,7 @@ var Point = Base.extend(/** @lends Point# */{
353359
*
354360
* @name Point#divide
355361
* @function
362+
* @operator
356363
* @param {Number} number the number to divide by
357364
* @return {Point} the division of the point and the value as a new point
358365
*
@@ -368,6 +375,7 @@ var Point = Base.extend(/** @lends Point# */{
368375
*
369376
* @name Point#divide
370377
* @function
378+
* @operator
371379
* @param {Point} point the point to divide by
372380
* @return {Point} the division of the two points as a new point
373381
*
@@ -388,6 +396,7 @@ var Point = Base.extend(/** @lends Point# */{
388396
*
389397
* @name Point#modulo
390398
* @function
399+
* @operator
391400
* @param {Number} value
392401
* @return {Point} the integer remainders of dividing the point by the value
393402
* as a new point
@@ -402,6 +411,7 @@ var Point = Base.extend(/** @lends Point# */{
402411
*
403412
* @name Point#modulo
404413
* @function
414+
* @operator
405415
* @param {Point} point
406416
* @return {Point} the integer remainders of dividing the points by each
407417
* other as a new point

src/basic/Size.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ var Size = Base.extend(/** @lends Size# */{
193193
*
194194
* @name Size#add
195195
* @function
196+
* @operator
196197
* @param {Number} number the number to add
197198
* @return {Size} the addition of the size and the value as a new size
198199
*
@@ -207,6 +208,7 @@ var Size = Base.extend(/** @lends Size# */{
207208
*
208209
* @name Size#add
209210
* @function
211+
* @operator
210212
* @param {Size} size the size to add
211213
* @return {Size} the addition of the two sizes as a new size
212214
*
@@ -228,6 +230,7 @@ var Size = Base.extend(/** @lends Size# */{
228230
*
229231
* @name Size#subtract
230232
* @function
233+
* @operator
231234
* @param {Number} number the number to subtract
232235
* @return {Size} the subtraction of the size and the value as a new size
233236
*
@@ -242,6 +245,7 @@ var Size = Base.extend(/** @lends Size# */{
242245
*
243246
* @name Size#subtract
244247
* @function
248+
* @operator
245249
* @param {Size} size the size to subtract
246250
* @return {Size} the subtraction of the two sizes as a new size
247251
*
@@ -262,6 +266,7 @@ var Size = Base.extend(/** @lends Size# */{
262266
*
263267
* @name Size#multiply
264268
* @function
269+
* @operator
265270
* @param {Number} number the number to multiply by
266271
* @return {Size} the multiplication of the size and the value as a new size
267272
*
@@ -276,6 +281,7 @@ var Size = Base.extend(/** @lends Size# */{
276281
*
277282
* @name Size#multiply
278283
* @function
284+
* @operator
279285
* @param {Size} size the size to multiply by
280286
* @return {Size} the multiplication of the two sizes as a new size
281287
*
@@ -296,6 +302,7 @@ var Size = Base.extend(/** @lends Size# */{
296302
*
297303
* @name Size#divide
298304
* @function
305+
* @operator
299306
* @param {Number} number the number to divide by
300307
* @return {Size} the division of the size and the value as a new size
301308
*
@@ -310,6 +317,7 @@ var Size = Base.extend(/** @lends Size# */{
310317
*
311318
* @name Size#divide
312319
* @function
320+
* @operator
313321
* @param {Size} size the size to divide by
314322
* @return {Size} the division of the two sizes as a new size
315323
*
@@ -330,6 +338,7 @@ var Size = Base.extend(/** @lends Size# */{
330338
*
331339
* @name Size#modulo
332340
* @function
341+
* @operator
333342
* @param {Number} value
334343
* @return {Size} the integer remainders of dividing the size by the value
335344
* as a new size
@@ -344,6 +353,7 @@ var Size = Base.extend(/** @lends Size# */{
344353
*
345354
* @name Size#modulo
346355
* @function
356+
* @operator
347357
* @param {Size} size
348358
* @return {Size} the integer remainders of dividing the sizes by each
349359
* other as a new size

src/core/PaperScript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ paper.PaperScope.prototype.PaperScript = new function() {
4747
'+': null
4848
};
4949

50-
// Add hidden math functions to Point, Size and Color
50+
// Add hidden math functions to Point, Size and Color.
5151
var fields = Base.each(
5252
'add,subtract,multiply,divide,modulo,negate'.split(','),
5353
function(name) {

src/path/Path.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ var Path = PathItem.extend(/** @lends Path# */{
412412
* @param {Segment|Point} segment the segment or point to be added.
413413
* @return {Segment} the added segment. This is not necessarily the same
414414
* object, e.g. if the segment to be added already belongs to another path.
415-
* @operator none
416415
*
417416
* @example {@paperscript}
418417
* // Adding segments to a path using point objects:

0 commit comments

Comments
 (0)