fromDirectionDegreesClockwise static method

AngleRange fromDirectionDegreesClockwise(
  1. double center,
  2. double extent
)

Constructs an AngleRange from the provided center angle defining the direction and an angular width to extent the range by 50% clockwise and 50% counter-clockwise from its center angle.

Corrects values if they exceed the ranges. Example: direction = 90, extent = 10 means the circle sector is pointing east, with an extent of 5 degrees north-wards and 5 degrees south-wards.

  • center Start angle, running clockwise, in degrees from north. The value will be normalized to [0.0, 360.0).

  • extent The range's extent, running clockwise, in degrees from start. The value will be clamped to the range of [0, 360] degrees.

Returns AngleRange. Created AngleRange from the provided center angle and the range's extent.

Implementation

static AngleRange fromDirectionDegreesClockwise(double center, double extent) => $prototype.fromDirectionDegreesClockwise(center, extent);