LongPoint2DLike

class Object
trait Matchable
class Any

Value members

Abstract methods

def x: Long
def y: Long

Concrete methods

final def contains(p: LongPoint2DLike): Boolean

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

Queries the overlap of this shape with a given LongPoint2D 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: LongPoint2DLike): BigInt
final def left: Long
final def orient(b: LongPoint2DLike): 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 LongPoint2D(4, 4) and the query point is LongPoint2D(4, 5), the result is 12. If the query is LongPoint2D(0, 0), the result is 5, etc.

final def top: Long