Explorar o código

Corrected issue with floor() #1377

raysan5 %!s(int64=5) %!d(string=hai) anos
pai
achega
405d3fac0c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/shaders/resources/shaders/glsl330/eratosthenes.fs

+ 1 - 1
examples/shaders/resources/shaders/glsl330/eratosthenes.fs

@@ -47,7 +47,7 @@ void main()
     {
         for (int i = 2; (i < max(2, sqrt(value) + 1)); i++) 
         {
-            if ((value - i*floor(value/i)) == 0) 
+            if ((value - i*floor(float(value)/float(i))) == 0)
             {
                 color = Colorizer(float(i), scale);
                 //break;    // Uncomment to color by the largest factor instead