pub fn linspace<T>(
dst: &mut [T],
first_value: T,
last_value: T,
endpoint: EndPoint,
)
Expand description
Computes a linear sequence of uniformly spaced values, starting with
first_value
and ending either at or just before last_value
, depending
on endpoint
. Results are written to dst
, whose length is used to
determine the step size between values.
This method works for most integer and floating point values. For integers, standard truncating division is used, so fractional values will be rounded towards zero.