Skip to content

Commit

Permalink
fixes #17
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeffian committed Sep 1, 2022
1 parent 91ed1ba commit fab5d66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/dev/yeff/orbital/graphics/Color.java
Expand Up @@ -49,9 +49,9 @@ public Color(byte r, byte g, byte b) {
}

public Color(float r, float g, float b) {
this.r = (byte) Mathf.clamp(r, 0, 255);
this.g = (byte) Mathf.clamp(g, 0, 255);
this.b = (byte) Mathf.clamp(b, 0, 255);
this.r = (byte) (Mathf.clamp(r, 0, 1) * 255.9999);
this.g = (byte) (Mathf.clamp(g, 0, 1) * 255.9999);
this.b = (byte) (Mathf.clamp(b, 0, 1) * 255.9999);
this.a = (byte) 255;
}

Expand Down

0 comments on commit fab5d66

Please sign in to comment.