@@ -627,7 +627,7 @@ vec2.str = function (a) {
627
627
if ( typeof ( exports ) !== 'undefined' ) {
628
628
exports . vec2 = vec2 ;
629
629
}
630
- ;
630
+
631
631
/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
632
632
633
633
Redistribution and use in source and binary forms, with or without modification,
@@ -1120,23 +1120,23 @@ vec3.transformQuat = function(out, a, q) {
1120
1120
* @returns {vec3 } out
1121
1121
*/
1122
1122
vec3 . rotateX = function ( out , a , b , c ) {
1123
- var p = [ ] , r = [ ] ;
1124
- //Translate point to the origin
1125
- p [ 0 ] = a [ 0 ] - b [ 0 ] ;
1126
- p [ 1 ] = a [ 1 ] - b [ 1 ] ;
1127
- p [ 2 ] = a [ 2 ] - b [ 2 ] ;
1123
+ var p = [ ] , r = [ ] ;
1124
+ //Translate point to the origin
1125
+ p [ 0 ] = a [ 0 ] - b [ 0 ] ;
1126
+ p [ 1 ] = a [ 1 ] - b [ 1 ] ;
1127
+ p [ 2 ] = a [ 2 ] - b [ 2 ] ;
1128
1128
1129
- //perform rotation
1130
- r [ 0 ] = p [ 0 ] ;
1131
- r [ 1 ] = p [ 1 ] * Math . cos ( c ) - p [ 2 ] * Math . sin ( c ) ;
1132
- r [ 2 ] = p [ 1 ] * Math . sin ( c ) + p [ 2 ] * Math . cos ( c ) ;
1129
+ //perform rotation
1130
+ r [ 0 ] = p [ 0 ] ;
1131
+ r [ 1 ] = p [ 1 ] * Math . cos ( c ) - p [ 2 ] * Math . sin ( c ) ;
1132
+ r [ 2 ] = p [ 1 ] * Math . sin ( c ) + p [ 2 ] * Math . cos ( c ) ;
1133
1133
1134
- //translate to correct position
1135
- out [ 0 ] = r [ 0 ] + b [ 0 ] ;
1136
- out [ 1 ] = r [ 1 ] + b [ 1 ] ;
1137
- out [ 2 ] = r [ 2 ] + b [ 2 ] ;
1134
+ //translate to correct position
1135
+ out [ 0 ] = r [ 0 ] + b [ 0 ] ;
1136
+ out [ 1 ] = r [ 1 ] + b [ 1 ] ;
1137
+ out [ 2 ] = r [ 2 ] + b [ 2 ] ;
1138
1138
1139
- return out ;
1139
+ return out ;
1140
1140
} ;
1141
1141
1142
1142
/*
@@ -1148,23 +1148,23 @@ vec3.rotateX = function(out, a, b, c){
1148
1148
* @returns {vec3 } out
1149
1149
*/
1150
1150
vec3 . rotateY = function ( out , a , b , c ) {
1151
- var p = [ ] , r = [ ] ;
1152
- //Translate point to the origin
1153
- p [ 0 ] = a [ 0 ] - b [ 0 ] ;
1154
- p [ 1 ] = a [ 1 ] - b [ 1 ] ;
1155
- p [ 2 ] = a [ 2 ] - b [ 2 ] ;
1151
+ var p = [ ] , r = [ ] ;
1152
+ //Translate point to the origin
1153
+ p [ 0 ] = a [ 0 ] - b [ 0 ] ;
1154
+ p [ 1 ] = a [ 1 ] - b [ 1 ] ;
1155
+ p [ 2 ] = a [ 2 ] - b [ 2 ] ;
1156
1156
1157
- //perform rotation
1158
- r [ 0 ] = p [ 2 ] * Math . sin ( c ) + p [ 0 ] * Math . cos ( c ) ;
1159
- r [ 1 ] = p [ 1 ] ;
1160
- r [ 2 ] = p [ 2 ] * Math . cos ( c ) - p [ 0 ] * Math . sin ( c ) ;
1157
+ //perform rotation
1158
+ r [ 0 ] = p [ 2 ] * Math . sin ( c ) + p [ 0 ] * Math . cos ( c ) ;
1159
+ r [ 1 ] = p [ 1 ] ;
1160
+ r [ 2 ] = p [ 2 ] * Math . cos ( c ) - p [ 0 ] * Math . sin ( c ) ;
1161
1161
1162
- //translate to correct position
1163
- out [ 0 ] = r [ 0 ] + b [ 0 ] ;
1164
- out [ 1 ] = r [ 1 ] + b [ 1 ] ;
1165
- out [ 2 ] = r [ 2 ] + b [ 2 ] ;
1162
+ //translate to correct position
1163
+ out [ 0 ] = r [ 0 ] + b [ 0 ] ;
1164
+ out [ 1 ] = r [ 1 ] + b [ 1 ] ;
1165
+ out [ 2 ] = r [ 2 ] + b [ 2 ] ;
1166
1166
1167
- return out ;
1167
+ return out ;
1168
1168
} ;
1169
1169
1170
1170
/*
@@ -1176,23 +1176,23 @@ vec3.rotateY = function(out, a, b, c){
1176
1176
* @returns {vec3 } out
1177
1177
*/
1178
1178
vec3 . rotateZ = function ( out , a , b , c ) {
1179
- var p = [ ] , r = [ ] ;
1180
- //Translate point to the origin
1181
- p [ 0 ] = a [ 0 ] - b [ 0 ] ;
1182
- p [ 1 ] = a [ 1 ] - b [ 1 ] ;
1183
- p [ 2 ] = a [ 2 ] - b [ 2 ] ;
1179
+ var p = [ ] , r = [ ] ;
1180
+ //Translate point to the origin
1181
+ p [ 0 ] = a [ 0 ] - b [ 0 ] ;
1182
+ p [ 1 ] = a [ 1 ] - b [ 1 ] ;
1183
+ p [ 2 ] = a [ 2 ] - b [ 2 ] ;
1184
1184
1185
- //perform rotation
1186
- r [ 0 ] = p [ 0 ] * Math . cos ( c ) - p [ 1 ] * Math . sin ( c ) ;
1187
- r [ 1 ] = p [ 0 ] * Math . sin ( c ) + p [ 1 ] * Math . cos ( c ) ;
1188
- r [ 2 ] = p [ 2 ] ;
1185
+ //perform rotation
1186
+ r [ 0 ] = p [ 0 ] * Math . cos ( c ) - p [ 1 ] * Math . sin ( c ) ;
1187
+ r [ 1 ] = p [ 0 ] * Math . sin ( c ) + p [ 1 ] * Math . cos ( c ) ;
1188
+ r [ 2 ] = p [ 2 ] ;
1189
1189
1190
- //translate to correct position
1191
- out [ 0 ] = r [ 0 ] + b [ 0 ] ;
1192
- out [ 1 ] = r [ 1 ] + b [ 1 ] ;
1193
- out [ 2 ] = r [ 2 ] + b [ 2 ] ;
1190
+ //translate to correct position
1191
+ out [ 0 ] = r [ 0 ] + b [ 0 ] ;
1192
+ out [ 1 ] = r [ 1 ] + b [ 1 ] ;
1193
+ out [ 2 ] = r [ 2 ] + b [ 2 ] ;
1194
1194
1195
- return out ;
1195
+ return out ;
1196
1196
} ;
1197
1197
1198
1198
/**
@@ -1249,7 +1249,7 @@ vec3.str = function (a) {
1249
1249
if ( typeof ( exports ) !== 'undefined' ) {
1250
1250
exports . vec3 = vec3 ;
1251
1251
}
1252
- ;
1252
+
1253
1253
/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
1254
1254
1255
1255
Redistribution and use in source and binary forms, with or without modification,
@@ -1774,7 +1774,7 @@ vec4.str = function (a) {
1774
1774
if ( typeof ( exports ) !== 'undefined' ) {
1775
1775
exports . vec4 = vec4 ;
1776
1776
}
1777
- ;
1777
+
1778
1778
/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
1779
1779
1780
1780
Redistribution and use in source and binary forms, with or without modification,
@@ -2017,7 +2017,7 @@ mat2.str = function (a) {
2017
2017
* @returns {Number } Frobenius norm
2018
2018
*/
2019
2019
mat2 . frob = function ( a ) {
2020
- return ( Math . sqrt ( Math . pow ( a [ 0 ] , 2 ) + Math . pow ( a [ 1 ] , 2 ) + Math . pow ( a [ 2 ] , 2 ) + Math . pow ( a [ 3 ] , 2 ) ) )
2020
+ return ( Math . sqrt ( Math . pow ( a [ 0 ] , 2 ) + Math . pow ( a [ 1 ] , 2 ) + Math . pow ( a [ 2 ] , 2 ) + Math . pow ( a [ 3 ] , 2 ) ) ) ;
2021
2021
} ;
2022
2022
2023
2023
/**
@@ -2039,7 +2039,7 @@ mat2.LDU = function (L, D, U, a) {
2039
2039
if ( typeof ( exports ) !== 'undefined' ) {
2040
2040
exports . mat2 = mat2 ;
2041
2041
}
2042
- ;
2042
+
2043
2043
/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
2044
2044
2045
2045
Redistribution and use in source and binary forms, with or without modification,
@@ -2291,13 +2291,13 @@ mat2d.str = function (a) {
2291
2291
* @returns {Number } Frobenius norm
2292
2292
*/
2293
2293
mat2d . frob = function ( a ) {
2294
- return ( Math . sqrt ( Math . pow ( a [ 0 ] , 2 ) + Math . pow ( a [ 1 ] , 2 ) + Math . pow ( a [ 2 ] , 2 ) + Math . pow ( a [ 3 ] , 2 ) + Math . pow ( a [ 4 ] , 2 ) + Math . pow ( a [ 5 ] , 2 ) + 1 ) )
2294
+ return ( Math . sqrt ( Math . pow ( a [ 0 ] , 2 ) + Math . pow ( a [ 1 ] , 2 ) + Math . pow ( a [ 2 ] , 2 ) + Math . pow ( a [ 3 ] , 2 ) + Math . pow ( a [ 4 ] , 2 ) + Math . pow ( a [ 5 ] , 2 ) + 1 ) ) ;
2295
2295
} ;
2296
2296
2297
2297
if ( typeof ( exports ) !== 'undefined' ) {
2298
2298
exports . mat2d = mat2d ;
2299
2299
}
2300
- ;
2300
+
2301
2301
/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
2302
2302
2303
2303
Redistribution and use in source and binary forms, with or without modification,
@@ -2781,14 +2781,14 @@ mat3.str = function (a) {
2781
2781
* @returns {Number } Frobenius norm
2782
2782
*/
2783
2783
mat3 . frob = function ( a ) {
2784
- return ( Math . sqrt ( Math . pow ( a [ 0 ] , 2 ) + Math . pow ( a [ 1 ] , 2 ) + Math . pow ( a [ 2 ] , 2 ) + Math . pow ( a [ 3 ] , 2 ) + Math . pow ( a [ 4 ] , 2 ) + Math . pow ( a [ 5 ] , 2 ) + Math . pow ( a [ 6 ] , 2 ) + Math . pow ( a [ 7 ] , 2 ) + Math . pow ( a [ 8 ] , 2 ) ) )
2784
+ return ( Math . sqrt ( Math . pow ( a [ 0 ] , 2 ) + Math . pow ( a [ 1 ] , 2 ) + Math . pow ( a [ 2 ] , 2 ) + Math . pow ( a [ 3 ] , 2 ) + Math . pow ( a [ 4 ] , 2 ) + Math . pow ( a [ 5 ] , 2 ) + Math . pow ( a [ 6 ] , 2 ) + Math . pow ( a [ 7 ] , 2 ) + Math . pow ( a [ 8 ] , 2 ) ) ) ;
2785
2785
} ;
2786
2786
2787
2787
2788
2788
if ( typeof ( exports ) !== 'undefined' ) {
2789
2789
exports . mat3 = mat3 ;
2790
2790
}
2791
- ;
2791
+
2792
2792
/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
2793
2793
2794
2794
Redistribution and use in source and binary forms, with or without modification,
@@ -3693,14 +3693,14 @@ mat4.str = function (a) {
3693
3693
* @returns {Number } Frobenius norm
3694
3694
*/
3695
3695
mat4 . frob = function ( a ) {
3696
- return ( Math . sqrt ( Math . pow ( a [ 0 ] , 2 ) + Math . pow ( a [ 1 ] , 2 ) + Math . pow ( a [ 2 ] , 2 ) + Math . pow ( a [ 3 ] , 2 ) + Math . pow ( a [ 4 ] , 2 ) + Math . pow ( a [ 5 ] , 2 ) + Math . pow ( a [ 6 ] , 2 ) + Math . pow ( a [ 6 ] , 2 ) + Math . pow ( a [ 7 ] , 2 ) + Math . pow ( a [ 8 ] , 2 ) + Math . pow ( a [ 9 ] , 2 ) + Math . pow ( a [ 10 ] , 2 ) + Math . pow ( a [ 11 ] , 2 ) + Math . pow ( a [ 12 ] , 2 ) + Math . pow ( a [ 13 ] , 2 ) + Math . pow ( a [ 14 ] , 2 ) + Math . pow ( a [ 15 ] , 2 ) ) )
3696
+ return ( Math . sqrt ( Math . pow ( a [ 0 ] , 2 ) + Math . pow ( a [ 1 ] , 2 ) + Math . pow ( a [ 2 ] , 2 ) + Math . pow ( a [ 3 ] , 2 ) + Math . pow ( a [ 4 ] , 2 ) + Math . pow ( a [ 5 ] , 2 ) + Math . pow ( a [ 6 ] , 2 ) + Math . pow ( a [ 6 ] , 2 ) + Math . pow ( a [ 7 ] , 2 ) + Math . pow ( a [ 8 ] , 2 ) + Math . pow ( a [ 9 ] , 2 ) + Math . pow ( a [ 10 ] , 2 ) + Math . pow ( a [ 11 ] , 2 ) + Math . pow ( a [ 12 ] , 2 ) + Math . pow ( a [ 13 ] , 2 ) + Math . pow ( a [ 14 ] , 2 ) + Math . pow ( a [ 15 ] , 2 ) ) ) ;
3697
3697
} ;
3698
3698
3699
3699
3700
3700
if ( typeof ( exports ) !== 'undefined' ) {
3701
3701
exports . mat4 = mat4 ;
3702
3702
}
3703
- ;
3703
+
3704
3704
/* Copyright (c) 2013, Brandon Jones, Colin MacKenzie IV. All rights reserved.
3705
3705
3706
3706
Redistribution and use in source and binary forms, with or without modification,
@@ -4230,7 +4230,7 @@ quat.str = function (a) {
4230
4230
if ( typeof ( exports ) !== 'undefined' ) {
4231
4231
exports . quat = quat ;
4232
4232
}
4233
- ;
4233
+
4234
4234
4235
4235
4236
4236
0 commit comments