Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
rogue-savage-rats/src/mightypork/utils/math/rect/RectDigest.java

41 lines
864 B

package mightypork.utils.math.rect;
import mightypork.utils.math.vect.VectConst;
public class RectDigest {
public final RectConst source;
public final VectConst origin;
public final VectConst size;
public final double x;
public final double y;
public final double width;
public final double height;
public final double left;
public final double right;
public final double top;
public final double bottom;
public RectDigest(Rect rect) {
this.source = rect.freeze();
this.origin = rect.origin().freeze();
this.size = rect.size().freeze();
this.x = rect.x().value();
this.y = rect.y().value();
this.width = rect.width().value();
this.height = rect.height().value();
this.left = rect.left().value();
this.right = rect.right().value();
this.top = rect.top().value();
this.bottom = rect.bottom().value();
}
}