def Vec3.cos_angle

bend-prot@0.1.0.0 · geom.bend:63

import bend-prot@0.1.0.0/geom.bend as Geom
import Base

63# Cosine of the angle between a and b. Undefined for zero vectors.
64def Vec3.cos_angle(+a: Vec3, +b: Vec3) -> F32:
65  (Vec3.dot(a, b) / F32.sqrt((Vec3.norm2(a) * Vec3.norm2(b) : F32)) : F32)

Uses (7)

Used by (1)