English
The signed distance from p to q in the direction of v is defined as the inner product of the normalized v with q−p, after projecting v onto the relevant subspace.
Русский
Знакованный километраж расстояния в направлении v равен внутреннему произведению нормализации v и вектора q−p после проекции v.
LaTeX
$$$$\\operatorname{signedDist}(v)(p,q) = \\langle \\operatorname{normalize}(v),\, q - p\\rangle.$$$$
Lean4
theorem signedDist_apply :
signedDist v p =
(innerSL ℝ (normalize v)).toContinuousAffineMap.comp (ContinuousAffineMap.id ℝ P -ᵥ .const ℝ P p) :=
rfl