Skip to content

Main content

Rotary Angle Wrap Token Tool

Separate a supplied rotary phase into full turns and a nonnegative within-turn angle.

Loading tool…

Description

Wrap a supplied rotary angle to one turn.

A full turn is 2π radians. Angles separated by an integer number of turns describe the same phase, but their signed turn counts differ. Separating a phase into whole turns and a nonnegative remainder is useful for periodic coordinates without constructing a model’s positional-frequency schedule.

Wrap a supplied rotary angle to one turn.

When to use this tool

Use Rotary Angle Wrap Token when checking the stated attention coordinate, visibility, angle or head-layout convention.

How to use the tool and how it works

  1. Enter angleRadians. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read wrapped, fullTurns. Use the output convention below.

Wrap a supplied rotary angle to one turn. wrapped is the nonnegative remainder modulo 2*pi, fullTurns = floor(angleRadians/(2*pi)).1

Input fieldMeaning and unitsAccepted input
angleRadiansAngle in radians on the specified axis/sign convention.Required. Finite number.
Output fieldInterpretationReturned shape
wrappedWithin-turn angle in radians, computed using floor(angleRadians/(2π)); negative angles wrap toward the next nonnegative phase.Required. Finite number.
fullTurnsSigned floor quotient, not truncation toward zero.Required. Finite number.
json
{
  "input": {
    "angleRadians": 21.991148575128552
  },
  "output": {
    "wrapped": 3.141592653589793,
    "fullTurns": 3
  }
}

Limitations and assumptions

  • Angles use radians; negative inputs have negative full-turn quotients, and no positional frequency schedule or model execution is provided.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Inspect the complete model configuration and implementation for positional schedules, masking, softmax and actual inference behavior.

References

  1. Calculation and input contract: artificial-intelligence/rotary-angle-wrap-token — tool.io

Similar or alternative tools