@@ -94,7 +94,7 @@ class Vector : public std::array<T, N>
9494 template <class ... Args>
9595 constexpr Vector (Args... args)
9696 {
97- // Not sure if perfect forwarding is required here !?
97+ // Not yet sure if perfect forwarding is required here !? studying...
9898 // assign<0>(std::forward<Args>(args)...);
9999 assign<0 >(args...);
100100 }
@@ -370,7 +370,7 @@ class Vector : public std::array<T, N>
370370
371371 template <typename TR = T>
372372 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 ())); }
374374
375375 constexpr WideType getDistanceTo (const Vector& other) const
376376 { return (other - *this ).getLength (); }
@@ -502,9 +502,9 @@ operator<<(IOStream &os, const Vector<U, M> &v)
502502 * This definition is useful for inclusion or intersection testing.
503503 */
504504template <typename T>
505- int8_t
505+ constexpr int8_t
506506ccw (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>;
508508
509509 const Vector<WideType, 2 > v1 = b - a;
510510 const Vector<WideType, 2 > v2 = c - a;
0 commit comments