def tangent_momentum_at(self, local_coordinates: Offsets) -> Offsets: if local_coordinates.distance == 0: return MutableOffsets(0, 0, 0) yaw = local_coordinates.rotated(90) * ( self._spin.yaw_radian * self.inertia / local_coordinates.distance) return yaw
def test_position_direction_is_90(self): assert self.target.position.direction == Offsets(0, -90, 0)
def setup(self): position = Offsets(1, 0, 1) forces = Offsets(0, 0, -1) self.target = Force(position, forces) self.target.force_multiplier = 1.0
def setup(self): self.target = Offsets(1, 0, 0)
def setup(self): position = Offsets(-1, 0, 0) forces = Offsets(0, 0, -1) self.target = Force(position, forces)
def test_force_of_summed_forces_is_two_forwards(self): assert self.force.forces == Offsets(0, 0, -2)
def test_position_of_summed_forces_is_origo(self): assert self.force.position == Offsets(0, 0, 0)
def setup(self): self.left_force = Force(Offsets(-1, 0, 0), Offsets(0, 0, -1)) self.right_force = Force(Offsets(1, 0, 0), Offsets(0, 0, -1)) self.force = self.left_force + self.right_force self.force.force_multiplier = 1.0