|
@@ -473,45 +473,10 @@ THREE.Vector4.prototype = {
|
|
|
|
|
|
// This function assumes min < max, if this assumption isn't true it will not operate correctly
|
|
// This function assumes min < max, if this assumption isn't true it will not operate correctly
|
|
|
|
|
|
- if ( this.x < min.x ) {
|
|
|
|
-
|
|
|
|
- this.x = min.x;
|
|
|
|
-
|
|
|
|
- } else if ( this.x > max.x ) {
|
|
|
|
-
|
|
|
|
- this.x = max.x;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if ( this.y < min.y ) {
|
|
|
|
-
|
|
|
|
- this.y = min.y;
|
|
|
|
-
|
|
|
|
- } else if ( this.y > max.y ) {
|
|
|
|
-
|
|
|
|
- this.y = max.y;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if ( this.z < min.z ) {
|
|
|
|
-
|
|
|
|
- this.z = min.z;
|
|
|
|
-
|
|
|
|
- } else if ( this.z > max.z ) {
|
|
|
|
-
|
|
|
|
- this.z = max.z;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if ( this.w < min.w ) {
|
|
|
|
-
|
|
|
|
- this.w = min.w;
|
|
|
|
-
|
|
|
|
- } else if ( this.w > max.w ) {
|
|
|
|
-
|
|
|
|
- this.w = max.w;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+ this.x = Math.max( min.x, Math.min( max.x, this.x ) );
|
|
|
|
+ this.y = Math.max( min.y, Math.min( max.y, this.y ) );
|
|
|
|
+ this.z = Math.max( min.z, Math.min( max.z, this.z ) );
|
|
|
|
+ this.w = Math.max( min.w, Math.min( max.w, this.w ) );
|
|
|
|
|
|
return this;
|
|
return this;
|
|
|
|
|