Yes it does:
print clamp(1.0, 0.5, 2.5)
print clamp(-1.0, 0.5, 2.5)
print clamp(10.0, 0.5, 2.5)
wait key
This correctly displays 1, 0.5 and 2.5. Are you mixing the types somehow? Sometimes DBPro doesn't make the best choice of functions when you mix them.
Anyway, here's a long overdue release:
Matrix1Util_01 - 1.1.0.3
- Internal change, relocation of code to shared repository.
Matrix1Util_02 - 1.1.0.5
- Internal switch from MS hash_map to tr1 unordered_map.
Matrix1Util_03 - 1.1.0.3
- Internal switch from MS hash_map to tr1 unordered_map.
- Internal switch from boost shared_ptr to tr1 shared_ptr.
Matrix1Util_04 - 1.1.0.4
- Added memblock read/write for strings, double integers and double floats.
- Changed all size parameters to accept integer values instead of dwords to remove unnecessary type conversions in DBPro.
Matrix1Util_08 - 1.1.0.3
- Internal switch from MS hash_map to tr1 unordered_map.
- Internal switch from boost shared_ptr to tr1 shared_ptr.
Matrix1Util_10 - 1.1.0.2
- Internal switch from MS hash_map to tr1 unordered_map.
Matrix1Util_12 - 1.1.0.7
- Added new versions of the GET LIMB BY NAME with a starting limb number.
Matrix1Util_13 - 1.1.0.6
- Added GET DISPLAY DEPTH function.
Matrix1Util_15 - 1.1.0.2
- SET ENTRY BUFFER and ADD TO ENTRY BUFFER commands added.
Matrix1Util_18 - 1.1.0.6
- Addition of multi-limbed planes.
-- Current design is to allow 1 texture per limb - this may not be what's generally needed and may change later.
-- In addition, width and depth must be positive values.
- Internal reorganisation of code.
Matrix1Util_19 - 1.1.0.4
- Added commands to exclude (or not) by group, or all objects.
- Added commands to call function pointers by group or all objects.
- Renamed functions GROUP COUNT & GROUP OBJECT to OBJECT GROUP COUNT and OBJECT FROM GROUP
- Tightened up checking of function pointers.
- Internal switch from MS hash_map to tr1 unordered_map.
Matrix1Util_20 - 1.1.0.6
- Internal switch from MS hash_map to tr1 unordered_map.
- Added new function to get DBPro function names by index.
- Tightened up the checking of function index ranges in GET PTR TO FUNCTION.
Matrix1Util_21 - 1.1.0.4
- Added FIND FREE ZONE functions.
- Refactored code for easier expansion and lower memory usage.
- Added group functions that act in the same way as object groups.
Matrix1Util_22 - 1.1.0.8
- Internal switch from MS hash_map to tr1 unordered_map.
- Correction of boost library usage.
Matrix1Util_26 - 1.1.0.0
- Internal code cleanup.
Matrix1Util_28 - 1.1.0.0
- Internal switch from MS hash_map to tr1 unordered_map.
Matrix1Util_29 - 1.1.0.0
- Added new variation for GET ARRAYPTR COUNT.
- Corrected help for CLEAR ARRAY command regarding UDT strings/memory leaks.
- Allow index to be set to -1, or 1 past the end of the array.
Matrix1Util_31 - 1.1.0.0
- Correction of boost library usage.
Version change only
Matrix1Util_14 - 1.1.0.0
Matrix1Util_25 - 1.1.0.0
Matrix1Util_27 - 1.1.0.0
Matrix1Util_30 - 1.1.0.0
Matrix1Util_32 - 1.1.0.0
There's nothing earth-shattering in this release - mostly internal changes that should not affect functionality - but some of the functions in the object group plug-in have been renamed so that I could re-use that same idea in other plug-ins (just zones so far).