Jass documentation Database

JASS Documentation Database REFORGED

Results for the query "ModuloReal" as a "function"

The search keyword must be a single word (no spaces).

Function ModuloReal

Line: 857
Location: blizzard.j
Constant? no
Type: function
Arguments: real dividend, real divisor
Returns: real


Extra spaces may have been removed from the original file to show the function in a comfortable way.
  1. function ModuloReal takes real dividend, real divisor returns real
  2.     local real modulus = dividend - I2R(R2I(dividend / divisor)) * divisor
  4.     // If the dividend was negative, the above modulus calculation will
  5.     // be negative, but within (-divisor..0).  We can add (divisor) to
  6.     // shift this result into the desired range of (0..divisor).
  7.     if (modulus < 0) then
  8.         set modulus = modulus + divisor
  9.     endif
  11.     return modulus
  12. endfunction
Page loaded in 0.083 seconds.
Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...