cross_ratio
- cross_ratio(a, b, c, d)[source]
Calculate the cross ratio of a quadruple of distinct points on the real line.
The cross ratio is defined as:
\[r = \frac{ (a-b)(c-d) }{ (a-d)(c-b) }\]- Parameters:
a (array-like or number) – Input points.
b (array-like or number) – Input points.
c (array-like or number) – Input points.
d (array-like or number) – Input points.
- Returns:
r – The cross ratio.
- Return type:
array-like or number
References