IntSquare

final case class IntSquare(cx: Int, cy: Int, extent: Int) extends IntSquareLike
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Inherited methods

final def area: Long
Inherited from:
IntSquareLike
final def bottom: Int

The bottom is defined as the center y coordinate plus the extent minus one, it thus designed the 'last pixel' still inside the square. This was changed from the previous definition of 'cy + extent' to be able to use the full 31 bit signed int space for a square without resorting to long conversion.

The bottom is defined as the center y coordinate plus the extent minus one, it thus designed the 'last pixel' still inside the square. This was changed from the previous definition of 'cy + extent' to be able to use the full 31 bit signed int space for a square without resorting to long conversion.

Inherited from:
IntSquareLike
final def containsH(quad: HyperCube): Boolean

Checks whether a given square is fully contained in this square. This is also the case if their bounds full match.

Checks whether a given square is fully contained in this square. This is also the case if their bounds full match.

Inherited from:
IntSquareLike
final def containsP(point: PointLike): Boolean
Inherited from:
IntSquareLike
final def indexOfH(aq: HyperCube): Int

Determines the quadrant index of another internal square aq.

Determines the quadrant index of another internal square aq.

Returns:

the index of the quadrant (beginning at 0), or -1 if aq lies outside of this square.

Inherited from:
IntSquareLike
final def indexOfP(a: PointLike): Int

Determines the quadrant index of a point a.

Determines the quadrant index of a point a.

Returns:

the index of the quadrant (beginning at 0), or -1 if a lies outside of this square.

Inherited from:
IntSquareLike
final def isAreaGreater(a: HyperCube, b: Long): Boolean
Inherited from:
IntSquareLike
final def isAreaNonEmpty(area: Long): Boolean
Inherited from:
IntSquareLike
final def left: Int
Inherited from:
IntSquareLike
final def maxDistance(point: PointLike): Double

Calculates the maximum distance to a point in the euclidean metric. This calls maxDistanceSq and then takes the square root.

Calculates the maximum distance to a point in the euclidean metric. This calls maxDistanceSq and then takes the square root.

Inherited from:
IntSquareLike
final def maxDistanceSq(point: PointLike): Long

Calculates the maximum squared distance to a point in the euclidean metric. This is the distance (squared) to the corner which is the furthest from the point, no matter if it lies within the square or not.

Calculates the maximum squared distance to a point in the euclidean metric. This is the distance (squared) to the corner which is the furthest from the point, no matter if it lies within the square or not.

Inherited from:
IntSquareLike
final def minDistance(point: PointLike): Double

Calculates the minimum distance to a point in the euclidean metric. This calls minDistanceSq and then takes the square root.

Calculates the minimum distance to a point in the euclidean metric. This calls minDistanceSq and then takes the square root.

Inherited from:
IntSquareLike
final def minDistanceSq(point: PointLike): Long

The squared (euclidean) distance of the closest of the square's corners or sides to the point, if the point is outside the square, or zero, if the point is contained

The squared (euclidean) distance of the closest of the square's corners or sides to the point, if the point is outside the square, or zero, if the point is contained

Inherited from:
IntSquareLike
final def orthant(idx: Int): HyperCube
Inherited from:
IntSquareLike
final def overlapArea(q: HyperCube): Long
Inherited from:
IntSquareLike
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
final def right: Int

The right is defined as the center x coordinate plus the extent minus one, it thus designed the 'last pixel' still inside the square. This was changed from the previous definition of 'cx + extent' to be able to use the full 31 bit signed int space for a square without resorting to long conversion.

The right is defined as the center x coordinate plus the extent minus one, it thus designed the 'last pixel' still inside the square. This was changed from the previous definition of 'cx + extent' to be able to use the full 31 bit signed int space for a square without resorting to long conversion.

Inherited from:
IntSquareLike
final def side: Int

The side length is two times the extent. Note that this may overflow if the extent is greater than 0x3FFFFFFF.

The side length is two times the extent. Note that this may overflow if the extent is greater than 0x3FFFFFFF.

Inherited from:
IntSquareLike
final def top: Int

The top is center-y minus the extent.

The top is center-y minus the extent.

Note therefore, that the vertical coordinates are considered top-down as in screen coordinates, not bottom-up!

Inherited from:
IntSquareLike