parent
f14f240aa7
commit
d368270ebc
|
@ -68,14 +68,8 @@ impl<N> DVec<N> {
|
||||||
|
|
||||||
impl<N> FromIterator<N> for DVec<N> {
|
impl<N> FromIterator<N> for DVec<N> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_iter<I: Iterator<Item = N>>(mut param: I) -> DVec<N> {
|
fn from_iter<I: Iterator<Item = N>>(param: I) -> DVec<N> {
|
||||||
let mut res = DVec { at: Vec::new() };
|
DVec { at: param.collect() }
|
||||||
|
|
||||||
for e in param {
|
|
||||||
res.at.push(e)
|
|
||||||
}
|
|
||||||
|
|
||||||
res
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -497,7 +497,7 @@ macro_rules! small_dvec_from_impl (
|
||||||
|
|
||||||
impl<N: Zero> FromIterator<N> for $dvec<N> {
|
impl<N: Zero> FromIterator<N> for $dvec<N> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_iter<I: Iterator<Item = N>>(mut param: I) -> $dvec<N> {
|
fn from_iter<I: Iterator<Item = N>>(param: I) -> $dvec<N> {
|
||||||
let mut at: [N; $dim] = [ $( $zeros, )* ];
|
let mut at: [N; $dim] = [ $( $zeros, )* ];
|
||||||
|
|
||||||
let mut dim = 0;
|
let mut dim = 0;
|
||||||
|
|
Loading…
Reference in New Issue