forked from bedohswe/p3he
Fix rotation display.
This commit is contained in:
parent
8169e9e7c3
commit
adf47220c7
4
main.py
4
main.py
@ -3,7 +3,7 @@ from numba import jit
|
||||
|
||||
from time import time_ns, sleep
|
||||
from cmath import exp, pi
|
||||
from math import acos
|
||||
from math import acos, copysign
|
||||
import pygame
|
||||
import pygame.freetype
|
||||
from gyro import *
|
||||
@ -80,7 +80,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(acos(gPlayer.cRot.real) / pi * 180), font_fg, font_bg)[0]
|
||||
cRot_surf = font.render("cRot: " + str(copysign(acos(gPlayer.cRot.real),gPlayer.cRot.imag) / pi * 180), font_fg, font_bg)[0]
|
||||
|
||||
return fps_surf, cPos_surf, cRot_surf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user