MCPcopy Create free account
hub / github.com/android/ndk-samples / init_angles

Function init_angles

bitmap-plasma/app/src/main/cpp/plasma.cpp:99–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97static Fixed angle_sin_tab[ANGLE_2PI + 1];
98
99static void init_angles(void) {
100 int nn;
101 for (nn = 0; nn < ANGLE_2PI + 1; nn++) {
102 double radians = nn * M_PI / ANGLE_PI;
103 angle_sin_tab[nn] = FIXED_FROM_FLOAT(sin(radians));
104 }
105}
106
107static __inline__ Fixed angle_sin(Angle a) {
108 return angle_sin_tab[(uint32_t)a & (ANGLE_2PI - 1)];

Callers 1

init_tablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected