1 # Test proper behavior of the modf(vec2) function.
3 # test modf splits the input values into the two pieces and
4 # returns them correctly.
13 gl_Position = gl_Vertex;
19 uniform vec2 expected1;
20 uniform vec2 expected2;
21 uniform float tolerance;
26 temp = modf(value, tempi);
27 b1 = distance(tempi, expected1) < tolerance;
28 b2 = distance(temp, expected2) < tolerance;
29 gl_FragColor = vec4(b1, b2, 0.0, 1.0);
33 uniform vec2 value 1.5 2.5
34 uniform vec2 expected1 1.0 2.0
35 uniform vec2 expected2 0.5 0.5
36 uniform float tolerance 0.0041452078
38 probe rgba 0 0 1.0 1.0 0.0 1.0
40 uniform vec2 value -1.33 10.3333
41 uniform vec2 expected1 -1.0 10.0
42 uniform vec2 expected2 -0.33 0.3333
43 uniform float tolerance 0.0041452078
45 probe rgba 1 0 1.0 1.0 0.0 1.0