IntPoint2DLike

class Object
trait Matchable
class Any

Value members

Abstract methods

def x: Int
def y: Int

Concrete methods

final def contains(p: IntPoint2DLike): Boolean

Queries the overlap of this shape with a given IntPoint2D p. The point is considered to have a side length of 1!

Queries the overlap of this shape with a given IntPoint2D p. The point is considered to have a side length of 1!

Returns

true if this shape contains or partly overlaps the given point

def distanceSq(that: IntPoint2DLike): Long
final def left: Int
final def orient(b: IntPoint2DLike): Int

Returns the orientation of the given point wrt this point, according to the following scheme:

Returns the orientation of the given point wrt this point, according to the following scheme:

5 4 6 +---+ 1 | 0 | 2 +---+ 9 8 10

Therefore the horizontal orientation can be extracted with _ & 3, and the vertical orientation with _ >> 2, where orientation is 0 for 'parallel', 1 for 'before' and '3' for 'after', so that if the orient is before or after, the sign can be retrieved via _ - 2

For example, if this is IntPoint2D(4, 4) and the query point is IntPoint2D(4, 5), the result is 12. If the query is IntPoint2D(0, 0), the result is 5, etc.

final def top: Int