2.4 continued (#8092)

Quite a bit of work on 2.4

Co-authored-by: 3djc <Th1sisfmyofmyo>
This commit is contained in:
3djc
2020-11-14 14:55:37 +04:00
committed by GitHub
co-authored by 3djc <Th1sisfmyofmyo>
parent cd6aa7af00
commit 87cd9047b1
238 changed files with 5164 additions and 2755 deletions
+12
View File
@@ -31,6 +31,18 @@ inline T sgn(T a)
{
return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
template<class t> inline t min(t a, t b) { return a<b?a:b; }
template<class t> inline t max(t a, t b) { return a>b?a:b; }
template<class t> inline t limit(t mi, t x, t ma) { return min(max(mi,x),ma); }
inline int divRoundClosest(const int n, const int d)
{
if (d == 0)
return 0;
else
return ((n < 0) ^ (d < 0)) ? ((n - d/2)/d) : ((n + d/2)/d);
}
#endif
template<class T>