[DGD]Floating Point Math
    Kris Van Hees 
    aedil at alchar.org
       
    Mon Jul 10 16:35:37 CEST 2000
    
    
  
On Mon, Jul 10, 2000 at 02:29:54PM +0000, Erik Silo wrote:
> I am trying to to some percentage math in DGD, the only way I know to
> do this is with floating point formulas.  But, I cant figure out how
> to do this in DGD.  This is what I am after:
> 
> x percent of y == ?
> 
> I am tryin to do it this way:
> 
>   result= (x / 100) * y
>   then round the result to nearest int.
result = (y * x) / 100;
	Kris
List config page:  http://list.imaginary.com/mailman/listinfo/dgd
    
    
More information about the DGD
mailing list