Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.40 KB | None | 0 0
  1. stock Float:floatsuperround(Float:value, count)
  2. {
  3.     new
  4.         Float:tenincount = float(pow(10, count)),
  5.         Float:intpart = float(floatround(value, floatround_tozero)),
  6.         Float:fractpart = float(floatround(floatfract(value) * tenincount));
  7.  
  8.     return intpart + fractpart / tenincount;
  9. }
  10.  
  11. stock pow(value, degree)
  12. {
  13.     new
  14.         result = 1;
  15.  
  16.     while (degree--) {
  17.         result *= value;
  18.     }
  19.  
  20.     return result;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement