using GFX_PI instead of M_PI in graph demo

This commit is contained in:
Joel Bodenmann 2017-09-26 14:47:36 +02:00
parent 2513b54e71
commit 8219311877

View File

@ -85,7 +85,7 @@ int main(void) {
// Draw a sine wave // Draw a sine wave
for(i = 0; i < gwinGetWidth(gh); i++) { for(i = 0; i < gwinGetWidth(gh); i++) {
gwinGraphDrawPoint(gh, i-gwinGetWidth(gh)/2, 80*sin(2*0.2*M_PI*i/180)); gwinGraphDrawPoint(gh, i-gwinGetWidth(gh)/2, 80*sin(2*0.2*GFX_PI*i/180));
} }
// Modify the style // Modify the style
@ -95,7 +95,7 @@ int main(void) {
// Draw a different sine wave // Draw a different sine wave
for(i = 0; i < gwinGetWidth(gh)*5; i++) { for(i = 0; i < gwinGetWidth(gh)*5; i++) {
gwinGraphDrawPoint(gh, i/5-gwinGetWidth(gh)/2, 95*sin(2*0.2*M_PI*i/180)); gwinGraphDrawPoint(gh, i/5-gwinGetWidth(gh)/2, 95*sin(2*0.2*GFX_PI*i/180));
} }
// Change to a completely different style // Change to a completely different style