Improve the Clamp functions to accept any type of value for all parameters.

Implement common functions to work with date and time types and avoid duplicate code.
Remove unnecessary functions used to retrieve the valie in long integer instances.
Various other fixes and name adjustments.
This commit is contained in:
Sandu Liviu Catalin committed 2016-07-09 21:21:07 +03:00
1 parent bd75ffe305
commit a06efdafc5
4 files changed
+351 -109

No files matched your search

+6 -6
View File
@@ -904,12 +904,12 @@ void Register_Base(HSQUIRRELVM vm)
.Func(_SC("EpsGt"), &EpsGt< SQFloat >)
.Func(_SC("EpsLtEq"), &EpsLtEq< SQFloat >)
.Func(_SC("EpsGtEq"), &EpsGtEq< SQFloat >)
.Func(_SC("ClampI"), &Clamp< SQInteger >)
.Func(_SC("ClampF"), &Clamp< SQFloat >)
.Func(_SC("ClampMinI"), &ClampMin< SQInteger >)
.Func(_SC("ClampMinF"), &ClampMin< SQFloat >)
.Func(_SC("ClampMaxI"), &ClampMax< SQInteger >)
.Func(_SC("ClampMaxF"), &ClampMax< SQFloat >)
.Func(_SC("ClampI"), &Clamp< SQInteger, SQInteger, SQInteger >)
.Func(_SC("ClampF"), &Clamp< SQFloat, SQFloat, SQFloat >)
.Func(_SC("ClampMinI"), &ClampMin< SQInteger, SQInteger >)
.Func(_SC("ClampMinF"), &ClampMin< SQFloat, SQFloat >)
.Func(_SC("ClampMaxI"), &ClampMax< SQInteger, SQInteger >)
.Func(_SC("ClampMaxF"), &ClampMax< SQFloat, SQFloat >)
.Func(_SC("NextPow2"), &NextPow2)
.Func(_SC("SToB"), &SToB)
.Func(_SC("PackRGB"), &SqPackRGB)