I'd take the time range and compute the ratio of my custom range (x - startTime) to the entire range (EndTime - startTime) and set the number accordingly
thanks :)
let say I have 5 variables: rangeStart - rangeEnd -timeStart -timeEnd -currentTime how do I get a number between the 2 ranges (rangeStart and rangeEnd) based on the current time between timeStart and timeEnd so for example if timeStart = currentTime, number = rangeStart
Check dm
mathematically we'd do numberRange = rangeEnd - rangeStart timeRange = timeEnd - timeStart currentRange = timeEnd - currentTime currentNumber = rangeStart + numberRange*(currentRange/timeRange)
thanks so much
Обсуждают сегодня