Permalink
Browse files

STARTREK: Make atan table static

Currently, it is reloaded every atan call.
  • Loading branch information...
dafioram authored and sev- committed Aug 18, 2018
1 parent 54419e0 commit 16ee8aa69f48ad3dd9183b4a525ee600ddaa7294
Showing with 1 addition and 1 deletion.
  1. +1 −1 engines/startrek/math.cpp
@@ -54,7 +54,7 @@ Fixed14 StarTrekEngine::cos(Angle angle) {
}

Angle StarTrekEngine::atan2(int32 deltaX, int32 deltaY) {
const int16 atanTable[] = {
static const int16 atanTable[] = {
0x0000, 0x0064, 0x00c9, 0x012d, 0x0192, 0x01f6, 0x025b, 0x02c0,
0x0324, 0x0389, 0x03ee, 0x0453, 0x04b8, 0x051d, 0x0582, 0x05e8,
0x064d, 0x06b3, 0x0718, 0x077e, 0x07e4, 0x084a, 0x08b1, 0x0917,

0 comments on commit 16ee8aa

Please sign in to comment.