@@ -96,7 +96,7 @@ class Vector : public std::array<T, N>
96
96
template <class ... Args>
97
97
constexpr Vector (Args... args)
98
98
{
99
- // Not sure if perfect forwarding is required here !?
99
+ // Not yet sure if perfect forwarding is required here !? studying...
100
100
// assign<0>(std::forward<Args>(args)...);
101
101
assign<0 >(args...);
102
102
}
@@ -372,7 +372,7 @@ class Vector : public std::array<T, N>
372
372
373
373
template <typename TR = T>
374
374
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 ())); }
376
376
377
377
constexpr WideType getDistanceTo (const Vector& other) const
378
378
{ return (other - *this ).getLength (); }
@@ -504,9 +504,9 @@ operator<<(IOStream &os, const Vector<U, M> &v)
504
504
* This definition is useful for inclusion or intersection testing.
505
505
*/
506
506
template <typename T>
507
- int8_t
507
+ constexpr int8_t
508
508
ccw (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>;
510
510
511
511
const Vector<WideType, 2 > v1 = b - a;
512
512
const Vector<WideType, 2 > v2 = c - a;
0 commit comments