Show angle in degrees.

This commit is contained in:
bʰedoh₂ swé 2024-04-04 21:32:01 +05:00
parent f231973984
commit 983bad10a5

View File

@ -7,6 +7,7 @@ except ImportError:
from time import time_ns, sleep
from cmath import exp, pi
from math import acos
import pygame
import pygame.freetype
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]
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