From b17f52d7e614426b581529b1a5a43091c948221d Mon Sep 17 00:00:00 2001 From: epoch Date: Sun, 24 Dec 2017 04:36:34 -0600 Subject: s/%Lf/%f/g ; s/cosl/cos/g ; s/sinl/sin/g --- src/graphics_c3.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/graphics_c3.c b/src/graphics_c3.c index b53a661..4645c97 100644 --- a/src/graphics_c3.c +++ b/src/graphics_c3.c @@ -1,5 +1,4 @@ #define _POSIX_C_SOURCE 200809L //for fileno and strdup -#define _BSD_SOURCE #include #include #include @@ -8,8 +7,6 @@ #include #include #include -#define __USE_GNU //for longer math constants -#include #include "config.h" #include "common.h" @@ -333,7 +330,7 @@ void draw_c3_point_text(c3_t p,char *text) { int direction,ascent,descent; cs_t p2; p2=c3_to_cs(p); - snprintf(tmp,sizeof(tmp)-1,"(%Lf,%Lf,%Lf)",p.x,p.y,p.z); + snprintf(tmp,sizeof(tmp)-1,"(%f,%f,%f)",p.x,p.y,p.z); XTextExtents(font,text,strlen(text),&direction,&ascent,&descent,&overall); XDrawString(global.dpy,global.backbuffer,global.backgc,p2.x,p2.y+(descent+ascent),tmp,strlen(tmp)); }*/ @@ -369,8 +366,8 @@ void draw_screen() { //oh... this will need to be a couple more lines... of what? I forgot. -Sep 2017 radians tmprad=d2r((degrees){global.camera.r.y.d+90}); radians tmprad2=d2r((degrees){global.camera.r.y.d+90}); - global.camera.p.z-=(gra_global.split_flip)*((gra_global.split/gra_global.split_screen)*cosl( tmprad.r )); - global.camera.p.x-=(gra_global.split_flip)*((gra_global.split/gra_global.split_screen)*sinl( tmprad2.r )); + global.camera.p.z-=(gra_global.split_flip)*((gra_global.split/gra_global.split_screen)*cos( tmprad.r )); + global.camera.p.x-=(gra_global.split_flip)*((gra_global.split/gra_global.split_screen)*sin( tmprad2.r )); } for(cn=0;cn