At 7:58 PM -0700 8/25/06, Phil M wrote:
Is my Limit function efficient/practical; or is there a more
standardized approach?
FWIW Personally I use a pair of Min and Max functions
Function Bound(Extends doub as double, LowerBound as double,
UpperBound as double) As Double
if LowerBound <= UpperBound then
return Min(Max(doub, LowerBound), UpperBound)
else
Warn "Invalid bounds specified"
//Just return original value
return doub
end if
End Function
BTW Thanks for pointing out the Case Is syntax, I hadn't ever noticed
that before.
Regards,
Joe Huber
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>