b208.js 928 B

12345678910111213141516171819202122232425262728
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. function testMax () {
  6. var one = SIMD.Float32x4(NaN, 42, NaN, NaN)
  7. var two = SIMD.Float32x4(NaN, NaN, NaN, 3.14)
  8. var three = SIMD.Float32x4.max(one,two);
  9. return three;
  10. }
  11. function testMin () {
  12. var one = SIMD.Float32x4(NaN, 42, NaN, NaN)
  13. var two = SIMD.Float32x4(NaN, NaN, NaN, 3.14)
  14. var three = SIMD.Float32x4.min(one,two);
  15. return three;
  16. }
  17. for (var i = 0; i < 3; i++) {
  18. testMax();
  19. testMin();
  20. }
  21. print("testMin = " + testMin());
  22. print("testMax = " + testMax());