Stopping value wrapping when exceeding bit depth
daggaz
Is there any quick way to disable this property and instead get it to "max out" such that (in this case) values greater than 65535 are set to 65535? Obviously I can put some code in that will check each time and do the necessary arithmatic, but this will greatly reduce my program runtimes. Im hoping there are some flags somewhere or neat tricks with redimension (seems to keep the wrapping behavior so far)..
limit(num, low, high )
The limit function returns num, limited to the range from low to high :
num if low <= num <= high.
low if num < low .
high if num > high.
So wherever you have:
wave0 = value
replace that with:
wave0= limit(value,0,65535)
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
August 29, 2012 at 03:52 pm - Permalink
August 30, 2012 at 01:40 pm - Permalink