Ge Wangupdated tests3a080483 years agoHistory
29 lines · 630 B · Text
RawDownload
// testing Math.euclidean, which has three overloaded variants// added 1.5.0.0 @(0,0,0) => vec3 a;@(1,1,1) => vec3 b; @(0,0,0,0) => vec4 aa;@(1,1,1,1) => vec4 bb; [0.0, 0, 0, 0, 0] @=> float aaa[];[1.0, 1, 1, 1, 1] @=> float bbb[]; Math.euclidean( a, b ) => float y;Math.euclidean( aa, bb ) => float yy;Math.euclidean( aaa, bbb ) => float yyy; // the answerMath.sqrt(3) => float answer1;Math.sqrt(4) => float answer2;Math.sqrt(5) => float answer3; // use Math.equal() to test for equalityif( Math.equal( y, answer1 ) &&    Math.equal( yy, answer2 ) &&    Math.equal( yyy, answer3 ) ){    <<< "success" >>>;} 

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t