Changes between Initial Version and Version 1 of Ticket #1842, comment 5
- Timestamp:
- May 23, 2019, 2:13:08 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1842, comment 5
initial v1 3 3 4 4 {{{ 5 scaleRatio = (source.hi - source.lo + 1) / (dest.hi - dest.lo + 1) 6 result = 0 7 loop from 0 until 0 < source.hi: 8 result += int(scaleRatio * index) 5 scaleRatio = (source.hi - source.lo + 1) / (dest.hi - dest.lo + 1) 6 realIndex = 0 7 intIndex = 0 8 loop from 0 until 0 < source.hi: 9 realIndex += scaleRatio 10 intIndex = int(realIndex) 9 11 }}} 10 12