@@ -263,19 +263,19 @@ SIMD.int32x4 = function(x, y, z, w) {
263
263
}
264
264
265
265
/**
266
- * Construct a new instance of int32x4 number with 0xFFFFFFFF or 0x0 in each
267
- * lane, depending on the truth value in x, y, z, and w.
266
+ * Construct a new instance of int32x4 number with either true or false in each
267
+ * lane, depending on the truth values in x, y, z, and w.
268
268
* @param {boolean } flag used for x lane.
269
269
* @param {boolean } flag used for y lane.
270
270
* @param {boolean } flag used for z lane.
271
271
* @param {boolean } flag used for w lane.
272
272
* @constructor
273
273
*/
274
274
SIMD . int32x4 . bool = function ( x , y , z , w ) {
275
- return SIMD . int32x4 ( x ? - 1 : 0x0 ,
276
- y ? - 1 : 0x0 ,
277
- z ? - 1 : 0x0 ,
278
- w ? - 1 : 0x0 ) ;
275
+ return SIMD . int32x4 ( _PRIVATE . frombool ( x ) ,
276
+ _PRIVATE . frombool ( y ) ,
277
+ _PRIVATE . frombool ( z ) ,
278
+ _PRIVATE . frombool ( w ) ) ;
279
279
}
280
280
281
281
/**
@@ -579,7 +579,7 @@ SIMD.float32x4.withW = function(t, w) {
579
579
/**
580
580
* @param {float32x4 } t An instance of float32x4.
581
581
* @param {float32x4 } other An instance of float32x4.
582
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
582
+ * @return {int32x4 } true or false in each lane depending on
583
583
* the result of t < other.
584
584
*/
585
585
SIMD . float32x4 . lessThan = function ( t , other ) {
@@ -595,7 +595,7 @@ SIMD.float32x4.lessThan = function(t, other) {
595
595
/**
596
596
* @param {float32x4 } t An instance of float32x4.
597
597
* @param {float32x4 } other An instance of float32x4.
598
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
598
+ * @return {int32x4 } true or false in each lane depending on
599
599
* the result of t <= other.
600
600
*/
601
601
SIMD . float32x4 . lessThanOrEqual = function ( t , other ) {
@@ -611,7 +611,7 @@ SIMD.float32x4.lessThanOrEqual = function(t, other) {
611
611
/**
612
612
* @param {float32x4 } t An instance of float32x4.
613
613
* @param {float32x4 } other An instance of float32x4.
614
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
614
+ * @return {int32x4 } true or false in each lane depending on
615
615
* the result of t == other.
616
616
*/
617
617
SIMD . float32x4 . equal = function ( t , other ) {
@@ -627,7 +627,7 @@ SIMD.float32x4.equal = function(t, other) {
627
627
/**
628
628
* @param {float32x4 } t An instance of float32x4.
629
629
* @param {float32x4 } other An instance of float32x4.
630
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
630
+ * @return {int32x4 } true or false in each lane depending on
631
631
* the result of t != other.
632
632
*/
633
633
SIMD . float32x4 . notEqual = function ( t , other ) {
@@ -643,7 +643,7 @@ SIMD.float32x4.notEqual = function(t, other) {
643
643
/**
644
644
* @param {float32x4 } t An instance of float32x4.
645
645
* @param {float32x4 } other An instance of float32x4.
646
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
646
+ * @return {int32x4 } true or false in each lane depending on
647
647
* the result of t >= other.
648
648
*/
649
649
SIMD . float32x4 . greaterThanOrEqual = function ( t , other ) {
@@ -659,7 +659,7 @@ SIMD.float32x4.greaterThanOrEqual = function(t, other) {
659
659
/**
660
660
* @param {float32x4 } t An instance of float32x4.
661
661
* @param {float32x4 } other An instance of float32x4.
662
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
662
+ * @return {int32x4 } true or false in each lane depending on
663
663
* the result of t > other.
664
664
*/
665
665
SIMD . float32x4 . greaterThan = function ( t , other ) {
@@ -1156,7 +1156,7 @@ SIMD.float64x2.withY = function(t, y) {
1156
1156
/**
1157
1157
* @param {float64x2 } t An instance of float64x2.
1158
1158
* @param {float64x2 } other An instance of float64x2.
1159
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1159
+ * @return {int32x4 } true or false in each lane depending on
1160
1160
* the result of t < other.
1161
1161
*/
1162
1162
SIMD . float64x2 . lessThan = function ( t , other ) {
@@ -1170,7 +1170,7 @@ SIMD.float64x2.lessThan = function(t, other) {
1170
1170
/**
1171
1171
* @param {float64x2 } t An instance of float64x2.
1172
1172
* @param {float64x2 } other An instance of float64x2.
1173
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1173
+ * @return {int32x4 } true or false in each lane depending on
1174
1174
* the result of t <= other.
1175
1175
*/
1176
1176
SIMD . float64x2 . lessThanOrEqual = function ( t , other ) {
@@ -1184,7 +1184,7 @@ SIMD.float64x2.lessThanOrEqual = function(t, other) {
1184
1184
/**
1185
1185
* @param {float64x2 } t An instance of float64x2.
1186
1186
* @param {float64x2 } other An instance of float64x2.
1187
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1187
+ * @return {int32x4 } true or false in each lane depending on
1188
1188
* the result of t == other.
1189
1189
*/
1190
1190
SIMD . float64x2 . equal = function ( t , other ) {
@@ -1198,7 +1198,7 @@ SIMD.float64x2.equal = function(t, other) {
1198
1198
/**
1199
1199
* @param {float64x2 } t An instance of float64x2.
1200
1200
* @param {float64x2 } other An instance of float64x2.
1201
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1201
+ * @return {int32x4 } true or false in each lane depending on
1202
1202
* the result of t != other.
1203
1203
*/
1204
1204
SIMD . float64x2 . notEqual = function ( t , other ) {
@@ -1212,7 +1212,7 @@ SIMD.float64x2.notEqual = function(t, other) {
1212
1212
/**
1213
1213
* @param {float64x2 } t An instance of float64x2.
1214
1214
* @param {float64x2 } other An instance of float64x2.
1215
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1215
+ * @return {int32x4 } true or false in each lane depending on
1216
1216
* the result of t >= other.
1217
1217
*/
1218
1218
SIMD . float64x2 . greaterThanOrEqual = function ( t , other ) {
@@ -1226,7 +1226,7 @@ SIMD.float64x2.greaterThanOrEqual = function(t, other) {
1226
1226
/**
1227
1227
* @param {float64x2 } t An instance of float64x2.
1228
1228
* @param {float64x2 } other An instance of float64x2.
1229
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1229
+ * @return {int32x4 } true or false in each lane depending on
1230
1230
* the result of t > other.
1231
1231
*/
1232
1232
SIMD . float64x2 . greaterThan = function ( t , other ) {
@@ -1550,7 +1550,7 @@ SIMD.int32x4.withW = function(t, w) {
1550
1550
/**
1551
1551
* @param {int32x4 } t An instance of int32x4.
1552
1552
* @param {int32x4 } other An instance of int32x4.
1553
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1553
+ * @return {int32x4 } true or false in each lane depending on
1554
1554
* the result of t == other.
1555
1555
*/
1556
1556
SIMD . int32x4 . equal = function ( t , other ) {
@@ -1566,7 +1566,7 @@ SIMD.int32x4.equal = function(t, other) {
1566
1566
/**
1567
1567
* @param {int32x4 } t An instance of int32x4.
1568
1568
* @param {int32x4 } other An instance of int32x4.
1569
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1569
+ * @return {int32x4 } true or false in each lane depending on
1570
1570
* the result of t > other.
1571
1571
*/
1572
1572
SIMD . int32x4 . greaterThan = function ( t , other ) {
@@ -1582,7 +1582,7 @@ SIMD.int32x4.greaterThan = function(t, other) {
1582
1582
/**
1583
1583
* @param {int32x4 } t An instance of int32x4.
1584
1584
* @param {int32x4 } other An instance of int32x4.
1585
- * @return {int32x4 } 0xFFFFFFFF or 0x0 in each lane depending on
1585
+ * @return {int32x4 } true or false in each lane depending on
1586
1586
* the result of t < other.
1587
1587
*/
1588
1588
SIMD . int32x4 . lessThan = function ( t , other ) {
0 commit comments