pub trait VectorScalarOps<T, const N: usize>where
T: Scalar,{
// Required methods
fn add_scalar(&self, scalar: T) -> Self;
fn sub_scalar(&self, scalar: T) -> Self;
fn mul_scalar(&self, scalar: T) -> Self;
fn div_scalar(&self, scalar: T) -> Self;
fn rem_scalar(&self, scalar: T) -> Self;
}Expand description
Scalar-vector arithmetic operations.
Each method broadcasts the scalar across all lanes.
Required Methods§
Sourcefn add_scalar(&self, scalar: T) -> Self
fn add_scalar(&self, scalar: T) -> Self
Add a scalar to every lane.
Sourcefn sub_scalar(&self, scalar: T) -> Self
fn sub_scalar(&self, scalar: T) -> Self
Subtract a scalar from every lane.
Sourcefn mul_scalar(&self, scalar: T) -> Self
fn mul_scalar(&self, scalar: T) -> Self
Multiply every lane by a scalar.
Sourcefn div_scalar(&self, scalar: T) -> Self
fn div_scalar(&self, scalar: T) -> Self
Divide every lane by a scalar.
Sourcefn rem_scalar(&self, scalar: T) -> Self
fn rem_scalar(&self, scalar: T) -> Self
Compute the remainder of every lane divided by a scalar.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.