mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-06-21 09:35:43 +02:00
16 lines
No EOL
315 B
Text
16 lines
No EOL
315 B
Text
# RouterOS Function
|
|
# Copyright (c) Grzegorz Budny
|
|
# Modulo function
|
|
|
|
:global Modulo do={
|
|
|
|
:local truncated;
|
|
:local reminder;
|
|
|
|
:set $truncated ($number / $modulo);
|
|
:set $reminder ($number - ($modulo * $truncated));
|
|
|
|
:return $reminder
|
|
}
|
|
|
|
$Modulo number=number_to_be_devided modulo=modulo_value; |