Skip to main content
Version: Next

rejectOutOfRangeLatitude

Callable

  • rejectOutOfRangeLatitude(degrees: number): number

  • Drops a latitude that lies beyond a pole.

    Longitude needs no equivalent: AST's sky-to-pixel transform is trigonometric and so already periodic in 360 degrees, and 375 lands on exactly the same pixel as 15. Latitude gets no such treatment. Past the near pole the projection keeps evaluating and returns a finite but wrong pixel, and on the far hemisphere it returns AST__BAD, which reaches the render path as -Infinity and drags the whole catalog's bounding box with it -- minMaxArray skips NaN but not infinities. NaN is the state that pipeline already handles, so a row beyond the pole is dropped exactly as an unparseable one is.

    The bound is exclusive: a source at either pole is a real position AST transforms correctly.


    Parameters

    • degrees: number

    Returns number