public bool Overlaps(Projection b, out float distance, out int order) { var startDistance = Math.Abs(this.Start - b.End); var endDistance = Math.Abs(this.End - b.Start); if (startDistance < endDistance) { distance = startDistance; order = -1; } else { distance = endDistance; order = 1; } if (this.Start > b.End) return false; if (this.End < b.Start) return false; return true; }
public bool Equals(Projection other) { return this.Start == other.Start && this.End == other.End; }
public bool Overlaps(Projection b, out float distance) { int order; return Overlaps(b, out distance, out order); }
public bool Overlaps(Projection b) { if (this.Start > b.End) return false; if (this.End < b.Start) return false; return true; }
public override Projection Project(Vector2 axis) { return(Projection.Create(axis, worldVertices)); }
public bool Overlaps(Projection b, out float distance) { int order; return(Overlaps(b, out distance, out order)); }
public bool Equals(Projection other) { return(this.Start == other.Start && this.End == other.End); }