diff --git a/src/basic/Point.js b/src/basic/Point.js index d9553209..a2255ed6 100644 --- a/src/basic/Point.js +++ b/src/basic/Point.js @@ -864,6 +864,13 @@ var Point = Base.extend(/** @lends Point# */{ * var point2 = new Point(200, 5); * var minPoint = Point.min(point1, point2); * console.log(minPoint); // {x: 10, y: 5} + * + * @example + * // Solving with multiple points + * var point1 = new Point(60, 100); + * var point2 = new Point(200, 5); + * var point3 = new Point(250, 35); + * [point1, point2, point3].reduce(Point.min) // => Point {x: 60, y: 5} */ min: function(/* point1, point2 */) { var point1 = Point.read(arguments), @@ -888,6 +895,13 @@ var Point = Base.extend(/** @lends Point# */{ * var point2 = new Point(200, 5); * var maxPoint = Point.max(point1, point2); * console.log(maxPoint); // {x: 200, y: 100} + * + * @example + * // Solving with multiple points + * var point1 = new Point(60, 100); + * var point2 = new Point(200, 5); + * var point3 = new Point(250, 35); + * [point1, point2, point3].reduce(Point.max) // => Point {x: 250, y: 100} */ max: function(/* point1, point2 */) { var point1 = Point.read(arguments), diff --git a/src/basic/Size.js b/src/basic/Size.js index 6d9a8604..e5d6f965 100644 --- a/src/basic/Size.js +++ b/src/basic/Size.js @@ -466,6 +466,13 @@ var Size = Base.extend(/** @lends Size# */{ * var size2 = new Size(200, 5); * var minSize = Size.min(size1, size2); * console.log(minSize); // {width: 10, height: 5} + * + * @example + * // Solving with multiple sizes + * var size1 = new Size(60, 100); + * var size2 = new Size(200, 5); + * var size3 = new Size(250, 35); + * [size1, size2, size3].reduce(Size.min) // => Size {width: 60, height: 5} */ min: function(size1, size2) { return new Size( @@ -487,6 +494,13 @@ var Size = Base.extend(/** @lends Size# */{ * var size2 = new Size(200, 5); * var maxSize = Size.max(size1, size2); * console.log(maxSize); // {width: 200, height: 100} + * + * @example + * // Solving with multiple sizes + * var size1 = new Size(60, 100); + * var size2 = new Size(200, 5); + * var size3 = new Size(250, 35); + * [size1, size2, size3].reduce(Size.max) // => Size {width: 250, height: 100} */ max: function(size1, size2) { return new Size(