View Single Post
  #1  
Old 05-23-2007, 02:37 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
script/math question

Well, I can't seem to find a algorithm/function for it..
Like, if you have a music length, lets see 3mins and 2 secs

0 = 0 ---> 1 = 3.20mins
0 is 0 and 1 is max (3.20 mins)
like percentage, but with lower number (0 -> 1)

Or, if you have a rgb from a program (like paint) which is probably max 255 if I remember
0 = 0
1 = 255

Easy Example:
Max: 2

0 = 0
0.1 = 0.2
0.2 = 0.4
0.3 = 0.6
0.4 = 0.8
0.5 = 1
0.6 = 1.2
0.7 = 1.4
0.8 = 1.6
0.9 = 1.8
1 = 2

I'm using this for a GuiProgressCtrl control..
__________________
Reply With Quote