mymath.trigonometry.dist
Contains two functions hypot and distance
Module Contents
Functions
|
Returns hypotenuse of a right angled triangle given the length of its side |
|
Determine the euclidean distance between two 2d points p and q |
- mymath.trigonometry.dist.hypotenuse(a, b)
Returns hypotenuse of a right angled triangle given the length of its side
- Parameters
a (float) – length of the first side
b (float) – length of the second side
- Returns
length of the hypotenuse
- Return type
float
- mymath.trigonometry.dist.distance(p, q)
Determine the euclidean distance between two 2d points p and q
- Parameters
p (tuple) – x, y values of first point
q (tuple) – x, y values of first point
- Returns
distance between the two points
- Return type
float
