Function geo_nd::vector::add

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

Add another vector scaled by a value to a vector, returning the sum

Example

use geo_nd::vector;
let a = [3., 1.];
let b = [2., 3.];
assert_eq!( vector::add( a, &b, 3.), [9., 10.]);