aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/functors/NullaryFunctors.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/functors/NullaryFunctors.h')
-rw-r--r--Eigen/src/Core/functors/NullaryFunctors.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/functors/NullaryFunctors.h b/Eigen/src/Core/functors/NullaryFunctors.h
index 70efec3ec..88deebad7 100644
--- a/Eigen/src/Core/functors/NullaryFunctors.h
+++ b/Eigen/src/Core/functors/NullaryFunctors.h
@@ -94,7 +94,7 @@ struct linspaced_op_impl<Scalar,Packet,/*IsInteger*/true>
m_low(low),
m_multiplier((high-low)/convert_index<Scalar>(num_steps<=1 ? 1 : num_steps-1)),
m_divisor(convert_index<Scalar>(num_steps+high-low)/(high-low+1)),
- m_use_divisor((high-low+1)<num_steps)
+ m_use_divisor((high+1)<(low+num_steps))
{}
template<typename IndexType>