You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modified tNstrcmp so it only uses one while-loop and does not need the mode/state variable. Updated it to sort similarly to Windows natural sorting by treating hyphens similarly. Fixed a bug when one of the two characters was a digit -- it was getting the order reversed. Added some code to do a case-sensitive compare all things being equal (so that AAA sorts before aaa). Fixed places in Tacent that were using tString Left and Right now that the behaviour is consistent with ExtractLeft and ExtractRight.
Copy file name to clipboardExpand all lines: Modules/Foundation/Inc/Foundation/tFundamentals.h
+2-2
Original file line number
Diff line number
Diff line change
@@ -92,8 +92,8 @@ template<typename T> inline bool tInInterval(const T val, const T min, const T m
92
92
template<typename T> inlinebooltInRange(const T val, const T min, const T max) /* Returns val E [min, max] */ { returntInInterval(val, min, max); }
93
93
template<typename T> inlinebooltInRange(const T val, const T min, const T max, tBias bias) { returntInInterval(val, min, max, bias); }
94
94
95
-
template<typename T> inline T tSign(T val) { return val < T(0) ? T(-1) : val > T(0) ? T(1) : T(0); }
96
-
template<typename T> inline T tBinarySign(T val) { return val < T(0) ? T(-1) : T(1); } // Same as Sign but does not return 0 ever. Two return values only.
95
+
template<typename T> inline T tSign(T val) /* +1,-1, or 0 for equal, */ { return val < T(0) ? T(-1) : val > T(0) ? T(1) : T(0); }
96
+
template<typename T> inline T tBinarySign(T val) { return val < T(0) ? T(-1) : T(1); } // Same as Sign but does not return 0 ever. Two return values only.
97
97
template<typename T> inlinebooltIsZero(T a) { return a == T(0); }
98
98
template<typename T> inlinebooltApproxEqual(T a, T b, float e = Epsilon) { return (tAbs(a-b) < e); }
99
99
template<typename T> inlinebooltEquals(T a, T b) { return a == b; }
0 commit comments