wecopttool.core.degrees_to_radians

degrees_to_radians(degrees, sort=True)[source]

Convert a 1D array of angles in degrees to radians in the range \([-π, π)\) and optionally sort them.

Parameters:
  • degrees (FloatOrArray) – 1D array of angles in degrees.

  • sort (bool | None) – Whether to sort the angles from smallest to largest in \([-π, π)\).

Return type:

float | ndarray