Enode — API Reference
    Preparing search index...
    • Re-express a raw turn fraction as the value NEAREST near, by shifting it a whole turn either way.

      A pointer angle only ever reads back in [0, 1), so it wraps at the 12 o'clock seam: nudging a handle sitting at 0 anticlockwise reads 0.99, not -0.01. Taken literally that sends the handle right around the dial. Picking the representative closest to where the handle already is keeps a drag continuous, so the caller can then clamp it into the allowed arc instead of having it teleport across the seam.

      Parameters

      • raw: number
      • near: number

      Returns number