Improve math_clamp_safe() by not changing the value on invalid bounds

..and reorder parameters in the warning message to reflect their order
in the function definition.