mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-25 08:12:20 +00:00
[CHG] Use M_PI instead of custom macro for PI in two examples
This commit is contained in:
parent
675bdbab96
commit
6f00bceb2f
2 changed files with 28 additions and 32 deletions
|
@ -14,8 +14,6 @@
|
|||
#include "gfx/font.h"
|
||||
#include "gfx/ball.h"
|
||||
|
||||
#define PI 3.14159265358979323846F
|
||||
|
||||
extern GXRModeObj *rmode;
|
||||
|
||||
int main() {
|
||||
|
@ -77,12 +75,12 @@ int main() {
|
|||
spr+=0.1f;
|
||||
t+=0.01f;
|
||||
|
||||
if(t>n*2*PI) {
|
||||
if(t>n*2*M_PI) {
|
||||
n++;
|
||||
f+=0.01f;
|
||||
}
|
||||
|
||||
if(f>2*PI) {
|
||||
if(f>2*M_PI) {
|
||||
f=0;
|
||||
ff+=0.02f;
|
||||
}
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
#include "gfx/logo.h"
|
||||
#include "gfx/font.h"
|
||||
|
||||
#define PI 3.14159265358979323846F
|
||||
|
||||
extern GXRModeObj *rmode;
|
||||
|
||||
|
||||
|
@ -175,12 +173,12 @@ int main() {
|
|||
spr+=0.1f;
|
||||
t+=0.01f;
|
||||
|
||||
if(t>n*2*PI) {
|
||||
if(t>n*2*M_PI) {
|
||||
n++;
|
||||
f+=0.01f;
|
||||
}
|
||||
|
||||
if(f>2*PI) {
|
||||
if(f>2*M_PI) {
|
||||
f=0;
|
||||
ff+=0.02f;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue