Change cross_product() return type from int to float

This commit is contained in:
rev
2024-01-17 02:06:36 +03:00
parent 0e1f422a75
commit 602676bd9c
+1 -1
View File
@@ -51,7 +51,7 @@ class Vector:
) * (v2.end.x - v2.start.x)
return cross_product < 0
def cross_product(self, point: Point) -> int:
def cross_product(self, point: Point) -> float:
"""
Determine on which side of the vector a point lies.
Returns a positive number if on one side, negative if on the other, and 0 if on the line.