24 lines
324 B
TypeScript
24 lines
324 B
TypeScript
|
|
|
||
|
|
module mod_vtm_helfer
|
||
|
|
{
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author kcf <vidofnir@folksprak.org>
|
||
|
|
*/
|
||
|
|
export function div(x : int, y : int) : int
|
||
|
|
{
|
||
|
|
return Math.floor(x/y);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author kcf <vidofnir@folksprak.org>
|
||
|
|
*/
|
||
|
|
export function mod(x : int, y : int) : int
|
||
|
|
{
|
||
|
|
return (x - (y * div(x, y)));
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|