fixed len for simd
This commit is contained in:
parent
9b84d804ae
commit
42cb73de8e
1 changed files with 5 additions and 0 deletions
|
@ -346,6 +346,11 @@ macro_rules! impl_vector_default {
|
||||||
impl<S: Copy> Array for $VectorN<S> {
|
impl<S: Copy> Array for $VectorN<S> {
|
||||||
type Element = S;
|
type Element = S;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn len() -> usize {
|
||||||
|
$n
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_value(scalar: S) -> $VectorN<S> {
|
fn from_value(scalar: S) -> $VectorN<S> {
|
||||||
$VectorN { $($field: scalar),+ }
|
$VectorN { $($field: scalar),+ }
|
||||||
|
|
Loading…
Reference in a new issue