1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-19 16:47:14 +02:00

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
2016-07-09 21:21:07 +03:00
parent bd75ffe305
commit a06efdafc5
4 changed files with 351 additions and 109 deletions

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)