Skip to navigation

Revs on the BBC Micro

Maths (Geometry): arctanP

Name: arctanP [Show more] Type: Variable Category: Maths (Geometry) Summary: Table for arctan values when calculating pitch angles Deep dive: Trigonometry
Context: See this variable in context in the source code References: This variable is used as follows: * GetObjPitchAngle calls arctanP

This is very close to the following calculation: FOR I%, 0, 127 EQUB INT(0.5 + 776 - 512 * ATN(3.2595 * (I% + 128) / 256)) NEXT
.arctanP EQUB &FF, &FE, &FC, &FA, &F8, &F6, &F5, &F3 EQUB &F1, &EF, &ED, &EC, &EA, &E8, &E7, &E5 EQUB &E4, &E2, &E0, &DF, &DD, &DC, &DA, &D9 EQUB &D8, &D6, &D5, &D3, &D2, &D1, &CF, &CE EQUB &CD, &CC, &CA, &C9, &C8, &C7, &C5, &C4 EQUB &C3, &C2, &C1, &C0, &BF, &BD, &BC, &BB EQUB &BA, &B9, &B8, &B7, &B6, &B5, &B4, &B3 EQUB &B2, &B1, &B0, &AF, &AE, &AD, &AC, &AC EQUB &AB, &AA, &A9, &A8, &A7, &A6, &A5, &A5 EQUB &A4, &A3, &A2, &A1, &A1, &A0, &9F, &9E EQUB &9E, &9D, &9C, &9B, &9B, &9A, &99, &98 EQUB &98, &97, &96, &96, &95, &94, &94, &93 EQUB &92, &92, &91, &90, &90, &8F, &8E, &8E EQUB &8D, &8D, &8C, &8B, &8B, &8A, &8A, &89 EQUB &89, &88, &87, &87, &86, &86, &85, &85 EQUB &84, &84, &83, &83, &82, &82, &81, &81