Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainCore module · function

Native::

BrushMaskRotation

Experimental

Cos and sin of an angle in 1/65536 of a turn (FBrush::MaskAngle), by an integer CORDIC (Volder 1959).

Declaration

FBrushMaskRotation BrushMaskRotation(uint16_t Angle);
Header
#include "Native/BrushMask.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainCore"); in your module’s Build.cs.
Stability
Experimental: supported, may change in a minor version, with a changelog line.
Thread
Pure integer arithmetic, any thread: bit-identical on every compiler and platform.

Description

The quarter turn is split off exactly (multiples of a quarter turn are exact); the rest, below a quarter, runs 30 rotation steps in Q60 against a literal arctangent table in 2^-62 of a turn, then rounds to Q30. Every value lies within 2^-28 of the true one (BrushMask.Cordic).

Parameters

NameTypeDefaultMeaning
Angleuint16_t——
Note.

Pure integer arithmetic, any thread: bit-identical on every compiler and platform.