aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/RelativePoint.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-02-26 16:58:22 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-02-26 16:58:22 +0800
commit398bda6e8051368d48c0737719ce277028dce396 (patch)
treeefbf612ecd5f231b6ce8fd126273a5f49f29c8ca /src/main/java/me/shedaniel/rei/api/RelativePoint.java
parent9e55b44b710f38c63a4bfd17d0b07318d5c68535 (diff)
downloadRoughlyEnoughItems-398bda6e8051368d48c0737719ce277028dce396.tar.gz
RoughlyEnoughItems-398bda6e8051368d48c0737719ce277028dce396.tar.bz2
RoughlyEnoughItems-398bda6e8051368d48c0737719ce277028dce396.zip
Make dialog remember its location
Diffstat (limited to 'src/main/java/me/shedaniel/rei/api/RelativePoint.java')
-rw-r--r--src/main/java/me/shedaniel/rei/api/RelativePoint.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/rei/api/RelativePoint.java b/src/main/java/me/shedaniel/rei/api/RelativePoint.java
new file mode 100644
index 000000000..23339c96e
--- /dev/null
+++ b/src/main/java/me/shedaniel/rei/api/RelativePoint.java
@@ -0,0 +1,28 @@
+package me.shedaniel.rei.api;
+
+public class RelativePoint {
+
+ private double relativeX, relativeY;
+
+ public RelativePoint(double relativeX, double relativeY) {
+ this.relativeX = relativeX;
+ this.relativeY = relativeY;
+ }
+
+ public double getRelativeX() {
+ return relativeX;
+ }
+
+ public double getRelativeY() {
+ return relativeY;
+ }
+
+ public double getX(double width) {
+ return width * relativeX;
+ }
+
+ public double getY(double height) {
+ return height * relativeY;
+ }
+
+}