Function geo_nd::vector::comp_mult

source ·
pub fn comp_mult<V: Num, const D: usize>(v: [V; D], s: &[V; D]) -> [V; D]
Expand description

Consume the vector and return a new vector that is the original scaled in each coordinate a different scale factor

Example

use geo_nd::vector;
let a = vector::comp_mult([2., 4., 6.], &[1., 0., 2.]);
assert_eq!( a, [2., 0., 12.]);