File tree Expand file tree Collapse file tree 2 files changed +8
-20
lines changed Expand file tree Collapse file tree 2 files changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -290,15 +290,11 @@ THREE.Vector2.prototype = {
290
290
291
291
} ( ) ,
292
292
293
- clampLength : function ( ) {
293
+ clampLength : function ( min , max ) {
294
294
295
- var oldLength , newLength ;
295
+ var oldLength = this . length ( ) ;
296
296
297
- return function clampLength ( min , max ) {
298
-
299
- oldLength = this . length ( ) ;
300
-
301
- newLength = ( oldLength < min ) ? min : ( ( oldLength > max ) ? max : oldLength ) ;
297
+ var newLength = ( oldLength < min ) ? min : ( ( oldLength > max ) ? max : oldLength ) ;
302
298
303
299
if ( newLength !== oldLength ) {
304
300
@@ -308,9 +304,7 @@ THREE.Vector2.prototype = {
308
304
309
305
return this ;
310
306
311
- } ;
312
-
313
- } ( ) ,
307
+ } ,
314
308
315
309
floor : function ( ) {
316
310
Original file line number Diff line number Diff line change @@ -520,15 +520,11 @@ THREE.Vector3.prototype = {
520
520
521
521
} ( ) ,
522
522
523
- clampLength : function ( ) {
523
+ clampLength : function ( min , max ) {
524
524
525
- var oldLength , newLength ;
525
+ var oldLength = this . length ( ) ;
526
526
527
- return function clampLength ( min , max ) {
528
-
529
- oldLength = this . length ( ) ;
530
-
531
- newLength = ( oldLength < min ) ? min : ( ( oldLength > max ) ? max : oldLength ) ;
527
+ var newLength = ( oldLength < min ) ? min : ( ( oldLength > max ) ? max : oldLength ) ;
532
528
533
529
if ( newLength !== oldLength ) {
534
530
@@ -538,9 +534,7 @@ THREE.Vector3.prototype = {
538
534
539
535
return this ;
540
536
541
- } ;
542
-
543
- } ( ) ,
537
+ } ,
544
538
545
539
floor : function ( ) {
546
540
You can’t perform that action at this time.
0 commit comments