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
- Enter angleRadians. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| angleRadians | Angle in radians on the specified axis/sign convention. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| wrapped | Within-turn angle in radians, computed using floor(angleRadians/(2π)); negative angles wrap toward the next nonnegative phase. | Required. Finite number. |
| fullTurns | Signed floor quotient, not truncation toward zero. | Required. Finite number. |
{
"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
Similar or alternative tools
- Alibi Attention One Distance Penalty
Return one ALiBi-style distance penalty.
- Attention Query Key Dot Scale Term
Return scaled query-key dot product.