package csa.tiletools.worldgen.mapgen.miny.render.BB;

import csa.tiletools.worldgen.mapgen.processing.CSAProcessing;

public class AABB
  implements BoundingBox
{
  private int l;
  private int t;
  private int r;
  private int b;

  public AABB(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
  {
    this.l = CSAProcessing.floor(paramFloat1);
    this.t = CSAProcessing.floor(paramFloat2);
    this.r = CSAProcessing.ceil(paramFloat3);
    this.b = CSAProcessing.ceil(paramFloat4);
  }

    @Override
  public boolean overlap(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    return (paramInt1 <= this.r) && (paramInt2 <= this.b) && (paramInt3 >= this.l) && (paramInt4 >= this.t);
  }

    @Override
  public BBRect getExtends()
  {
    return new BBRect(this.l, this.t, this.r, this.b);
  }
}

