NNSOM.utils.rotate_xy

NNSOM.utils.rotate_xy(x1, y1, angle)[source]

Rotate 2-D coordinates by a given angle.

Parameters:
  • x1 (float or np.ndarray) – Original X-coordinate(s).

  • y1 (float or np.ndarray) – Original Y-coordinate(s).

  • angle (float) – Rotation angle in radians (counter-clockwise).

Returns:

  • x2 (float or np.ndarray) – Rotated X-coordinate(s).

  • y2 (float or np.ndarray) – Rotated Y-coordinate(s).