2
0
Эх сурвалжийг харах

Merge pull request #158 from Perjin/colorRGBA-bugfix

Fixed clamp method in ColorRGBA.
thanks to Perjin
Rémy Bouquet 11 жил өмнө
parent
commit
628f73cb79

+ 4 - 4
jme3-core/src/main/java/com/jme3/math/ColorRGBA.java

@@ -206,10 +206,10 @@ public final class ColorRGBA implements Savable, Cloneable, java.io.Serializable
      * Saturate that color ensuring all channels have a value between 0 and 1
      */
     public void clamp() {
-        FastMath.clamp(r, 0f, 1f);
-        FastMath.clamp(g, 0f, 1f);
-        FastMath.clamp(b, 0f, 1f);
-        FastMath.clamp(a, 0f, 1f);        
+        r = FastMath.clamp(r, 0f, 1f);
+        g = FastMath.clamp(g, 0f, 1f);
+        b = FastMath.clamp(b, 0f, 1f);
+        a = FastMath.clamp(a, 0f, 1f);
     }
 
     /**