You are viewing a single comment's thread. Return to all comments →
#python class Points(object): def __init__(self, x, y, z): self.x = x self.y = y self.z = z def __sub__(self, other): return Points(self.x - other.x, self.y - other.y, self.z - other.z) def dot(self, other): return self.x * other.x + self.y * other.y + self.z * other.z def cross(self, other): return Points( self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x ) def absolute(self): return pow((self.x ** 2 + self.y ** 2 + self.z ** 2), 0.5)
Seems like cookies are disabled on this browser, please enable them to open this website
Class 2 - Find the Torsional Angle
You are viewing a single comment's thread. Return to all comments →