@@ -94,7 +94,7 @@ class Vector : public std::array<T, N>
94
94
template <class ... Args>
95
95
constexpr Vector (Args... args)
96
96
{
97
- // Not sure if perfect forwarding is required here !?
97
+ // Not yet sure if perfect forwarding is required here !? studying...
98
98
// assign<0>(std::forward<Args>(args)...);
99
99
assign<0 >(args...);
100
100
}
@@ -370,7 +370,7 @@ class Vector : public std::array<T, N>
370
370
371
371
template <typename TR = T>
372
372
constexpr TR getLength () const
373
- { return modm::round_smart<TR, decltype ( std::sqrt ( getLengthSquared ())) >(std::sqrt (getLengthSquared ())); }
373
+ { return modm::round_smart<TR>(std::sqrt (getLengthSquared ())); }
374
374
375
375
constexpr WideType getDistanceTo (const Vector& other) const
376
376
{ return (other - *this ).getLength (); }
@@ -502,9 +502,9 @@ operator<<(IOStream &os, const Vector<U, M> &v)
502
502
* This definition is useful for inclusion or intersection testing.
503
503
*/
504
504
template <typename T>
505
- int8_t
505
+ constexpr int8_t
506
506
ccw (Vector<T, 2 > a, Vector<T, 2 > b, Vector<T, 2 > c) {
507
- using WideType = std::conditional<std::is_floating_point_v<T>, T, modm::WideType<T>>::type ;
507
+ using WideType = modm::WideType<T>;
508
508
509
509
const Vector<WideType, 2 > v1 = b - a;
510
510
const Vector<WideType, 2 > v2 = c - a;
0 commit comments