Show angle in degrees.
This commit is contained in:
parent
f231973984
commit
983bad10a5
3
main.py
3
main.py
@ -7,6 +7,7 @@ except ImportError:
|
|||||||
|
|
||||||
from time import time_ns, sleep
|
from time import time_ns, sleep
|
||||||
from cmath import exp, pi
|
from cmath import exp, pi
|
||||||
|
from math import acos
|
||||||
import pygame
|
import pygame
|
||||||
import pygame.freetype
|
import pygame.freetype
|
||||||
from gyro import *
|
from gyro import *
|
||||||
@ -84,7 +85,7 @@ def renderDebugInfo(gPlayer, clock, fontSize = 18):
|
|||||||
|
|
||||||
fps_surf = font.render("FPS: " + str(int(clock.get_fps())), font_fg, font_bg)[0]
|
fps_surf = font.render("FPS: " + str(int(clock.get_fps())), font_fg, font_bg)[0]
|
||||||
cPos_surf = font.render("cPos: " + str(gPlayer.cPos), font_fg, font_bg)[0]
|
cPos_surf = font.render("cPos: " + str(gPlayer.cPos), font_fg, font_bg)[0]
|
||||||
cRot_surf = font.render("cRot: " + str(gPlayer.cRot), font_fg, font_bg)[0]
|
cRot_surf = font.render("cRot: " + str(acos(gPlayer.cRot.real) / pi * 180), font_fg, font_bg)[0]
|
||||||
|
|
||||||
return fps_surf, cPos_surf, cRot_surf
|
return fps_surf, cPos_surf, cRot_surf
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user