@@ -96,7 +96,7 @@ class Vector : public std::array<T, N>
9696 template <class ... Args>
9797 constexpr Vector (Args... args)
9898 {
99- // Not sure if perfect forwarding is required here !?
99+ // Not yet sure if perfect forwarding is required here !? studying...
100100 // assign<0>(std::forward<Args>(args)...);
101101 assign<0 >(args...);
102102 }
@@ -372,7 +372,7 @@ class Vector : public std::array<T, N>
372372
373373 template <typename TR = T>
374374 constexpr TR getLength () const
375- { return modm::round_smart<TR, decltype ( std::sqrt ( getLengthSquared ())) >(std::sqrt (getLengthSquared ())); }
375+ { return modm::round_smart<TR>(std::sqrt (getLengthSquared ())); }
376376
377377 constexpr WideType getDistanceTo (const Vector& other) const
378378 { return (other - *this ).getLength (); }
@@ -504,9 +504,9 @@ operator<<(IOStream &os, const Vector<U, M> &v)
504504 * This definition is useful for inclusion or intersection testing.
505505 */
506506template <typename T>
507- int8_t
507+ constexpr int8_t
508508ccw (Vector<T, 2 > a, Vector<T, 2 > b, Vector<T, 2 > c) {
509- using WideType = std::conditional<std::is_floating_point_v<T>, T, modm::WideType<T>>::type ;
509+ using WideType = modm::WideType<T>;
510510
511511 const Vector<WideType, 2 > v1 = b - a;
512512 const Vector<WideType, 2 > v2 = c - a;
0 commit comments