ts-playground
    Preparing search index...

    Function toSignedRad

    • Normalizes a radian value to the range [-π, π).

      Parameters

      • rad: number

      Returns number

      The normalized radian value in the range [-π, π).

      // Normalizing a radian value
      const rad = 2 * Math.PI;
      const normalized = toSignedRad(rad);
      console.log(normalized); // Output: 0