A commit.

This commit is contained in:
bʰedoh₂ swé 2024-04-03 17:35:29 +05:00
parent d6e5cf9b5d
commit 64402f86b6
2 changed files with 4 additions and 3 deletions

View File

@ -35,7 +35,8 @@ class GyroVector:
self.normalize()
def __add__(gA, gB):
cAdd, cGyr = MobiusAddGyr(gA.cPos, gB.cPos * (1 / gA.cRot))
#cAdd, cGyr = MobiusAddGyr(gA.cPos, gB.cPos / gA.cRot)
cAdd, cGyr = MobiusAddGyr(gA.cPos, gB.cPos)
return GyroVector(cAdd, gA.cRot * gB.cRot * cGyr)
def __neg__(self):

View File

@ -86,9 +86,9 @@ def mainLoop():
if keys[pygame.K_a]:
gPlayer.rotate(IROT)
if keys[pygame.K_w]:
gPlayer -= GyroVector(OFFSET, 1)
gPlayer -= GyroVector(OFFSET * gPlayer.cRot, 1)
if keys[pygame.K_s]:
gPlayer += GyroVector(OFFSET, 1)
gPlayer += GyroVector(OFFSET * gPlayer.cRot, 1)
display.fill(WHITE)
#pygame.draw.rect(display,BLACK, c_tr(Poincare2Klein(gPlayer.cPos) * -100) + (100,100),0)
drawn = draw(level,gPlayer,PI/2,640)