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

Function SineWave

endless-tunnel/app/src/main/cpp/util.cpp:48–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48float SineWave(float min, float max, float period, float phase) {
49 float ampl = max - min;
50 return min + ampl * sin(((Clock() / period) + phase) * 2 * M_PI);
51}
52
53bool BlinkFunc(float period) { return (int)(Clock() / period) & 1; }

Callers 3

RenderMethod · 0.85
RenderObstaclesMethod · 0.85
RenderMenuMethod · 0.85

Calls 1

ClockFunction · 0.85

Tested by

no test coverage detected