Floor

From Kolmafia
Revision as of 04:27, 10 September 2009 by imported>Out of practice (Created page, discription of floor() function, example using the Purse Rat ML calculation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

int floor( float )

Rounds a float variable down to the closest integer beneath it.

For example:

int purse_rat_ML = floor( familiar_weight($familiar[109])/2 );
print( "Your squeaky little buddy is currently generating "+purse_rat_ML+" ML in aggression from monsters!" );