A commit.

This commit is contained in:
bʰedoh₂ swé 2024-04-03 17:29:07 +05:00
parent 2d08605590
commit 4f30139286

View File

@ -35,7 +35,7 @@ class GyroVector:
self.normalize()
def __add__(gA, gB):
cAdd, cGyr = MobiusAddGyr(gA.cPos, gB.cPos / ZeroCheck(gA.cRot))
cAdd, cGyr = MobiusAddGyr(gA.cPos, gB.cPos * (1 / gA.cRot))
return GyroVector(cAdd, gA.cRot * gB.cRot * cGyr)
def __neg__(self):
@ -56,7 +56,8 @@ class GyroVector:
self.cRot *= cRot
def transform(self, cA):
cAdd, cGyr = MobiusAddGyr(self.cPos, cA / ZeroCheck(self.cRot))
#cAdd, cGyr = MobiusAddGyr(self.cPos, cA / ZeroCheck(self.cRot))
cAdd, cGyr = MobiusAddGyr(self.cPos, cA / self.cRot)
self.cPos = cAdd
self.cRot = self.cRot * cGyr
@ -66,4 +67,4 @@ class GyroVector:
return gA.copy().transform(cA)
def nrtransformed(self, cA):
return MobiusAdd(self.cPos, cA / ZeroCheck(self.cRot))
return MobiusAdd(self.cPos, cA / self.cRot)