- Home /
 
               Question by 
               asger · Jun 01, 2011 at 04:34 PM · 
                mathexponential  
              
 
              Math exponential number conversion
Hi I just realized i forgot all about math.. I need to make a function that would output values like this: 1 = 0.125 12 = 0.25 24 = 0.5 36 = 1 48 = 2 60 = 4 72 = 8
So if you were to feed it with 1, you would get 0.125 - and if you fed it 6 you would get a value between 0.125 and 0.25, and so on, all values exponential.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by asger · Jun 01, 2011 at 04:52 PM
oh, I figured it out..  float ValueConverter(int _initial) { float multiplier = (Mathf.Pow((float)2, (float)_initial/12)); return 0.125f*multiplier; } 
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                