pub fn take(&self, n: usize) -> Take<C, T>
    where
        T: AsRef<[(C::Scalar, C)]>,
    {
        let (min, max) = self.domain();

        Take {
            gradient: MaybeSlice::Slice(self.clone()),
            from: min.clone(),
            diff: max - min,
            len: n,
            from_head: 0,
            from_end: 0,
        }
    }
/// Take `n` evenly spaced colors from the gradient slice, as an iterator.
Take `n` evenly spaced colors from the gradient slice, as an iterator.
Take ` n ` evenly spaced colors from the gradient slice as an iterator .
pub fn take(&self, n: usize) -> Take<C, T>
    where
        T: AsRef<[(C::Scalar, C)]>,
    {
        let (min, max) = self.domain();
        Take {
            gradient: MaybeSlice::Slice(self.clone()),
            from: min.clone(),
            diff: max - min,
            len: n,
            from_head: 0,
            from_end: 0,
        }
    }
pub fn take ( & self , n : usize ) -> Take < C , T > where T : AsRef < [ ( C :: Scalar , C ) ] > , { let ( min , max ) = self . domain ( ) ; Take { gradient : MaybeSlice :: Slice ( self . clone ( ) ) , from : min . clone ( ) , diff : max - min , len : n , from_head : 0 , from_end : 0 , } }
Take `n` evenly spaced colors from the gradient slice, as an iterator.
Take ` n ` evenly spaced colors from the gradient slice as an iterator .
&self
n
usize
&self
n
usize