diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-05-03 18:27:33 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-05-03 18:27:33 +0200 |
commit | 1230851c384369bd4eeb32856588100616e93f79 (patch) | |
tree | 8d6949a7771da4cda04f0296fea1c20a827f1b35 /src/main/java/cc/polyfrost/oneconfig | |
parent | a0ff501947a84b268e099524a06b56a6b900dad2 (diff) | |
download | OneConfig-1230851c384369bd4eeb32856588100616e93f79.tar.gz OneConfig-1230851c384369bd4eeb32856588100616e93f79.tar.bz2 OneConfig-1230851c384369bd4eeb32856588100616e93f79.zip |
floats
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java | 10 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java index 93e104e..5709823 100644 --- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java +++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java @@ -1,12 +1,12 @@ package cc.polyfrost.oneconfig.lwjgl; public class Scissor { - public int x; - public int y; - public int width; - public int height; + public float x; + public float y; + public float width; + public float height; - public Scissor(int x, int y, int width, int height) { + public Scissor(float x, float y, float width, float height) { this.x = x; this.y = y; this.width = width; diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java index ee78eca..db85e86 100644 --- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java +++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java @@ -7,7 +7,7 @@ import java.util.ArrayList; public class ScissorManager { private static final ArrayList<Scissor> scissors = new ArrayList<>(); - public static Scissor scissor(long vg, int x, int y, int width, int height) { + public static Scissor scissor(long vg, float x, float y, float width, float height) { Scissor scissor = new Scissor(x, y, width, height); if (scissors.contains(scissor)) return scissor; scissors.add(scissor); @@ -28,8 +28,8 @@ public class ScissorManager { Scissor finalScissor = new Scissor(scissors.get(0)); for (int i = 1; i < scissors.size(); i++) { Scissor scissor = scissors.get(i); - int rightX = Math.min(scissor.x + scissor.width, finalScissor.x + finalScissor.width); - int rightY = Math.min(scissor.y + scissor.height, finalScissor.y + finalScissor.height); + float rightX = Math.min(scissor.x + scissor.width, finalScissor.x + finalScissor.width); + float rightY = Math.min(scissor.y + scissor.height, finalScissor.y + finalScissor.height); finalScissor.x = Math.max(finalScissor.x, scissor.x); finalScissor.y = Math.max(finalScissor.y, scissor.y); finalScissor.width = rightX - finalScissor.x; |