(Mar-17-2023, 09:04 AM)menator01 Wrote: What have you tried?
I've tried checking the steps/4 intervals on an incremental basis, including overlapping backwards and forwards into the neighbouring intervals, like:
baseCoord = coordinate // 10000*10000 remainder = round(coordinate/100)/10%10 if remainder <= 1.25: min = baseCoord - scale/2 elif remainder <= 3.75: min = baseCoord elif remainder <= 6.25: min = baseCoord + scale/2 elif remainder <= 8.75: min = baseCoord else: min = baseCoord*1.5 return [min, min+scale]But I thought there must be a pure computational solution without the need for the conditionals, or what do you think? :-)