Let's say I want to scale a range of numbers... say, from 0.0 to 1.0 and translate it into another range, say 0 to 320.
How would I do this?
Nash wrote:But I just realized the player's angle doesn't really work the way I thought it should though... hmmm... turning clockwise (to the right) decreases the the value instead of increasing.
x = NewMax * n/OldMax
n = 160 //Convert 160 to 0.0-1.0 range
NewMax = 1.0
OldMax = 320
x = 1.0 * 160/320
x = 1.0 * 0.5
x = 0.5
x = NewMax * n/OldMax
n = 20 //0-32 range, going to new 0-10 range
NewMax = 10
OldMax = 32
x = 10 * 20/32
x = 10 * 0.625
x = 6.25
Nash wrote:
- Code: Select all • Expand view
x = NewMax * n/OldMax
What would n be?
EXP: 1/300
EXP to next level: 299 // found by using EXP To Next Level - Current EXP
EXP: 300/600
EXP to next level: 300
HotWax's equation should work fine. I'll try to explain it better --Nash wrote:I... still don't get it. Formula, please?
Project Dark Fox wrote:(Total accumulated XP for all previous levels) = Bottom End
(Distance from that point to next) = Top End
Users browsing this forum: Bing [Bot], jmickle, MaxED and 4 guests