From 983bad10a5cfeebeeca6bdffeb2a95ad4242d64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Thu, 4 Apr 2024 21:32:01 +0500 Subject: [PATCH] Show angle in degrees. --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 395bd89..e0c5ba8 100755 --- a/main.py +++ b/main.py @@ -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