quadrantOf

public final Integer quadrantOf(ImmutablePosition position, Plane.MaxQuadrants maxQuadrants, Boolean useMiddle)

Gets the quadrant of the given position according the circle center.

This method does not check if the position is in the circle area.

Return

if maxQuadrants is Plane.MaxQuadrants.FOUR, a value in the range 1 to 4; otherwise, a value in the range 1 to 8.

Parameters

position

The position with x and y coordinates.

maxQuadrants

The max quadrants in the circle.

useMiddle

Sets true if you want to use the middle of angle quadrant.

See also


public final Integer quadrantOf(ImmutablePosition position, Plane.MaxQuadrants maxQuadrants)

Gets the quadrant of the given position according the circle center.

This method does not check if the position is in the circle area.

Return

if maxQuadrants is Plane.MaxQuadrants.FOUR, a value in the range 1 to 4; otherwise, a value in the range 1 to 8.

Parameters

position

The position with x and y coordinates.

maxQuadrants

The max quadrants in the circle.


@IntRange(from = 1, to = 4)
public final Integer quadrantOf(ImmutablePosition position, Boolean useMiddle)

Gets the quadrant of the given position.

This method does not check if the position is in the circle area.

Return

A value in the range 1 to 4.

Parameters

position

The position with x and y coordinates.

useMiddle

Sets true if you want to use the middle of angle quadrant.


@IntRange(from = 1, to = 4)
public final Integer quadrantOf(ImmutablePosition position)

Gets the quadrant of the given position.

This method does not check if the position is in the circle area.

Return

A value in the range 1 to 4.

Parameters

position

The position with x and y coordinates.