Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenEarable/open-earable
/ triangle
Function
triangle
src/audio_play/ToneGenerator.cpp:6–8 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
4
const float pi = PI;
5
6
float triangle(float f) {
7
return 1-abs(abs(2*f / pi - 3)-2);
8
}
9
10
float square(float f) {
11
return f <= pi ? 1 : -1;
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected