-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
There is two option to calculate dot product - only with vector argument and second option with vector and theta. There is line of code that calculate this:
return (self.magnitude() * vector.magnitude() * math.degrees(math.cos(theta)))which gives wrong values. Result of third part should be between -1 and 1 (as cosinus values) and provided angle should be converted from degrees to radians so it should be like:
return self.magnitude() * vector.magnitude() * math.cos(math.radians(theta))I created pull request with fix #26.
Metadata
Metadata
Assignees
Labels
No labels