aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/api/RelativePoint.java
blob: 23339c96ef18ad724714b91b119c83e26937200b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;
    }
    
}