Jass:ModuloReal
Aus Mappedia
| Funktion: ModuloReal | |
|---|---|
| Parameter: | real real |
| Rückgabewert: | real |
| Autor: | Blizzard |
| Quelle: | Blizzard.j |
| Synchron: | Unbekannt |
Berechnet den Rest bei einer Division von dividend durch divisor.
Code
function ModuloReal takes real dividend, real divisor returns real local real modulus = dividend - I2R(R2I(dividend / divisor)) * divisor // If the dividend was negative, the above modulus calculation will // be negative, but within (-divisor..0). We can add (divisor) to // shift this result into the desired range of (0..divisor). if (modulus < 0) then set modulus = modulus + divisor endif return modulus endfunction
Parameter
| Typ | Name | Beschreibung |
|---|---|---|
| real | dividend | |
| real | divisor |

russische Team, stehen wir nun im Halbfinale vor einem weiteren Giganten der e-Sports-Szene:
Finnland! Die Skandinavier hatten es im Gegensatz zu unserem