blob: 0de0a589371721fc7a7a3b460d199b94d525000f (
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
29
30
31
32
33
|
package dev.isxander.yacl.api.utils;
import dev.isxander.yacl.impl.utils.DimensionIntegerImpl;
public interface Dimension<T extends Number> {
T x();
T y();
T width();
T height();
T xLimit();
T yLimit();
T centerX();
T centerY();
boolean isPointInside(T x, T y);
MutableDimension<T> clone();
Dimension<T> withX(T x);
Dimension<T> withY(T y);
Dimension<T> withWidth(T width);
Dimension<T> withHeight(T height);
Dimension<T> moved(T x, T y);
Dimension<T> expanded(T width, T height);
static MutableDimension<Integer> ofInt(int x, int y, int width, int height) {
return new DimensionIntegerImpl(x, y, width, height);
}
}
|