Skip to navigation

Aviator on the BBC Micro

Maths: sinHi

Name: sinHi [Show more] Type: Variable Category: Maths Summary: High byte of the sine lookup table Deep dive: Trigonometry
Context: See this variable in context in the source code References: This variable is used as follows: * Sine16Bit uses sinHi

See sinLo for an explanation of this table.
.sinHi FOR I%, 0, 256 N = SIN((I% / 256) * (PI / 2)) IF N >= 1 B% = 255 ELSE B% = HI(INT(N * 65536)) ENDIF EQUB B% NEXT