MCPcopy Create free account
hub / github.com/asb2m10/dexed / sinLog

Function sinLog

Source/EngineMkI.cpp:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62const uint16_t ENV_MAX = 1<<ENV_BITDEPTH;
63
64static inline uint16_t sinLog(uint16_t phi) {
65 const uint16_t SINLOG_TABLEFILTER = SINLOG_TABLESIZE-1;
66 const uint16_t index = (phi & SINLOG_TABLEFILTER);
67
68 switch( ( phi & (SINLOG_TABLESIZE * 3) ) ) {
69 case 0:
70 return sinLogTable[index];
71 case SINLOG_TABLESIZE:
72 return sinLogTable[index ^ SINLOG_TABLEFILTER];
73 case SINLOG_TABLESIZE * 2 :
74 return sinLogTable[index] | NEGATIVE_BIT;
75 default:
76 return sinLogTable[index ^ SINLOG_TABLEFILTER] | NEGATIVE_BIT;
77 }
78}
79
80EngineMkI::EngineMkI() {
81 float bitReso = SINLOG_TABLESIZE;

Callers 1

mkiSinFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected