Coordinate¶
-
class
hotwing_core.
Coordinate
(x, y)[source]¶ 2 Dimensional X-Y coordinate.
Parameters: - x (float) – X value of coordinate
- y (float) – Y value of coordinate
Variables: - x – x coordinate
- y – y coordinate
-
classmethod
calc_dist
(a, b)[source]¶ Calculate the distance between two Coordinates.
Parameters: - a (Coordinate) – First Coordinate
- b (Coordinate) – Second Coordinate
Returns: Distance between c1 and c2
Return type: Float
-
classmethod
calc_slope
(a, b)[source]¶ Calculate the slope between two Coordinates.
Parameters: - a (Coordinate) – First Coordinate
- b (Coordinate) – Second Coordinate
Returns: Slope between a and b
Return type: Float
-
classmethod
rotate
(origin, coordinate, angle)[source]¶ Rotate a Coordinate around a point in 2D space.
Parameters: - origin (Coordinate) – Defines the point to rotate around
- coordinate (Coordinate) – The Coordinate to rotate
- angle (Float) – Degrees to rotate Coordinate
Returns: New rotated Coordinate
Return type: