Skip to content

Commit 053eea0

Browse files
committed
Fixed bug and added copyToMinMax function
1 parent 4c61839 commit 053eea0

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

v3/src/math/MinMax2.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ var MinMax2 = new Class({
5454
return this;
5555
},
5656

57+
copyToMinMax: function (dest)
58+
{
59+
dest.min = this.min;
60+
dest.max = this.max;
61+
62+
return this;
63+
},
64+
5765
// Given U (a value between 0 and 1) return the value in the range
5866
getU: function (u)
5967
{

v3/src/math/MinMax4.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ var MinMax4 = new Class({
6060
if (yMin === undefined) { yMin = xMin; }
6161
if (yMax === undefined) { yMax = xMax; }
6262

63-
this.setX(xMax, xMax);
64-
this.setY(yMax, yMax);
63+
this.setX(xMin, xMax);
64+
this.setY(yMin, yMax);
6565

6666
return this;
6767
},
@@ -98,6 +98,22 @@ var MinMax4 = new Class({
9898
return dest;
9999
},
100100

101+
copyXToMinMax: function (dest)
102+
{
103+
dest.min = this.xMin;
104+
dest.max = this.xMax;
105+
106+
return this;
107+
},
108+
109+
copyYToMinMax: function (dest)
110+
{
111+
dest.min = this.yMin;
112+
dest.max = this.yMax;
113+
114+
return this;
115+
},
116+
101117
/*
102118
// Given U (a value between 0 and 1) return the value in the range
103119
getU: function (u)

0 commit comments

Comments
 (0)