Tweak documentation added to Point / Size #min() / #max() a bit.

This commit is contained in:
Jürg Lehni 2016-01-10 18:13:11 +01:00
parent 7b29bb177d
commit 4830562e4f
2 changed files with 8 additions and 8 deletions

View file

@ -866,11 +866,11 @@ var Point = Base.extend(/** @lends Point# */{
* console.log(minPoint); // {x: 10, y: 5}
*
* @example
* // Solving with multiple points
* // Find the minimum of 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}
* [point1, point2, point3].reduce(Point.min) // {x: 60, y: 5}
*/
min: function(/* point1, point2 */) {
var point1 = Point.read(arguments),
@ -897,11 +897,11 @@ var Point = Base.extend(/** @lends Point# */{
* console.log(maxPoint); // {x: 200, y: 100}
*
* @example
* // Solving with multiple points
* // Find the maximum of 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}
* [point1, point2, point3].reduce(Point.max) // {x: 250, y: 100}
*/
max: function(/* point1, point2 */) {
var point1 = Point.read(arguments),

View file

@ -468,11 +468,11 @@ var Size = Base.extend(/** @lends Size# */{
* console.log(minSize); // {width: 10, height: 5}
*
* @example
* // Solving with multiple sizes
* // Find the minimum of 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}
* [size1, size2, size3].reduce(Size.min) // {width: 60, height: 5}
*/
min: function(size1, size2) {
return new Size(
@ -496,11 +496,11 @@ var Size = Base.extend(/** @lends Size# */{
* console.log(maxSize); // {width: 200, height: 100}
*
* @example
* // Solving with multiple sizes
* // Find the maximum of 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}
* [size1, size2, size3].reduce(Size.max) // {width: 250, height: 100}
*/
max: function(size1, size2) {
return new Size(