Function toolbelt::normalize_with_constant
source · [−]Expand description
Normalizes a 3-vector with one value that stays constant. e.g. (0.6, 0.4, 0.8) => (0.6, 0.2, 0.4) Only tested with all-positive vectors, may misbehave when negatives are involved.