Skip to content

NetFabric/NetFabric.Numerics / .agents/skills/angles-and-circular-arithmetic

angles-and-circular-arithmetic

Verified

Abstract math for angle measurement, unit systems, and circular arithmetic. USE FOR: implementing angle types; converting between degrees/radians/gradians/revolutions; reducing angles to canonical range [0, Full); computing reference angles and quadrants; implementing safe modular arithmetic with negative inputs; angle addition and subtraction; classifying angles by sign and size. DO NOT USE FOR: trigonometric functions (use trigonometric-functions); coordinate conversions (use coordinate-system-conversions); interpolation (use interpolation-on-manifolds).

Angles & Circular Arithmetic

Unit Systems

UnitFull (2π equiv)RightStraight
Degrees36090180
Radians2ππ/2π
Gradians400100200
Revolutions10.250.5

Conversion Factors (multiply source by factor)

From \ ToDegreesRadiansGradiansRevolutions
Degrees1π/18010/91/360
Radians180/π1200/π1/(2π)
Gradians9/10π/20011/400
Revolutions3602π4001

Canonical Reduction to [0, Full)

reduced = θ − Full × ⌊θ / Full⌋
Input (degrees)Result
−30°330°
0°0°
360°0°
720°0°
−360°0°

Quadrant Classification (after reduction to [0°, 360°))

RangeName
θ = 0°PositiveX axis
0° < θ < 90°First
θ = 90°PositiveY axis
90° < θ < 180°Second
θ = 180°NegativeX axis
180° < θ < 270°Third
θ = 270°NegativeY axis
270° < θ < 360°Fourth

Reference Angle (acute angle to nearest x-axis)

QuadrantFormula
Firstθ
Second180° − θ
Thirdθ − 180°
Fourth360° − θ

Reference Files

FileLoad When
references/formulas.mdUnit conversion derivations, reduction algorithm, DMS format, arithmetic proofs
references/numerical-stability.mdMod with negatives, precision loss in conversion, large-angle reduction
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 193kUpdated Claude CodeCodexVerifiedInstall