瀏覽代碼

Corrected issue with floor() #1377

raysan5 5 年之前
父節點
當前提交
405d3fac0c
共有 1 個文件被更改,包括 1 次插入1 次删除
  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