deg90to90

ssapy.utils.deg90to90(val_in)[source][source]

Normalize angles to the range [-90, 90].

This function adjusts angles such that they fall within the range [-90, 90]. It works for both single values and iterable inputs.

Parameters:

val_in (int, float, or iterable):
  • A single angle (int or float).

  • An iterable (e.g., list, tuple, or numpy array) of angles.

Returns:

int, float, or list:
  • If a single angle is provided, returns the normalized angle in the range [-90, 90].

  • If an iterable of angles is provided, returns a list of normalized angles in the range [-90, 90].

Example:

deg90to90(100) -> 10 deg90to90([-100, 200, -270]) -> [-10, -70, -90]