Строка 102: |
Строка 102: |
| } | | } |
| | | |
− | == Math == | + | == Математика == |
− | The math operators are for the most part pretty standard, the only one to watch out for is division which is not the expected / (as that would clash with comments in the naive ntsl parser)
| + | Обычные математические операторы. |
| | | |
− | * is multiplication | + | * - умножение |
| | | |
− | + is addition | + | + - добавление |
| | | |
− | - is subtraction | + | - - отнимание |
| | | |
− | / is division | + | / - деление |
| | | |
− | ^ is exponentiation | + | ^ - вывод в степень |
| | | |
| == NT Deluxe Namespaces == | | == NT Deluxe Namespaces == |
| | | |
− | Nanotrasen will constantly add new universal functions and features to NTSL, here are a few of them: | + | Nanotrasen будет усовершенствовать некоторые функции, вот некоторые из них: |
| | | |
| | | |
Строка 123: |
Строка 123: |
| | | |
| :{|style="background:#999999" | | :{|style="background:#999999" |
− | !align="left" width="200"| Syntax | + | !align="left" width="200"| Синтаксис |
− | !align="left" width="100"| Returns | + | !align="left" width="100"| Выводит |
− | !align="left" width="800"| Description | + | !align="left" width="800"| Описание |
| |- | | |- |
| | bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | | | | bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | |
| |- | | |- |
− | | prob(number) || number || Returns nonzero is the probability succeeded. Returns zero if the probability failed. | + | | prob(number) || число || Выводит число (не ноль) если вывелось true. Выводит ноль, если вывелось false. |
| |- | | |- |
| | bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | | | | bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | |
| |- | | |- |
− | | sqrt(number) || number || Returns the square root of Arg.1. | + | | sqrt(number) || число || Квадратный корень из заданного числа. |
| |- | | |- |
− | | abs(number) || number || Returns the magnitude of Arg.1. | + | | abs(number) || число || Модуль заданного числа. |
| |- | | |- |
| | bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | | | | bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | |
| |- | | |- |
− | | floor(number) || number || Returns the Arg.1 rounded down to nearest integer. | + | | floor(number) || число || Округляет заданное число к меньшему. 1.2 и 1.8 станет 1.0, -1.2 станет -2.0. |
| |- | | |- |
− | | ceil(number) || number || Returns the Arg.1 rounded up to nearest integer. | + | | ceil(number) || число || Округляет заданное число к большему. 1.2 и 1.8 станет 2.0, -1.2 станет -1.0. |
| |- | | |- |
− | | round(number) || number || Returns the Arg.1 rounded to nearest integer. 1.5 becomes 2, 1.49 becomes 1. | + | | round(number) || число || Округляет заданное число. 1.5 станет 2, 1.49 becomes 1. |
| |- | | |- |
| | bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | | | | bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | || bgcolor="#AAAAAA" | |
| |- | | |- |
− | | clamp(number, number, number) || number || Clamps Arg.1 between min(Arg.2) and max(Arg.3). clamp(30, -30, 25) = 25 | + | | clamp(number, number, number) || число || Clamps Arg.1 between min(Arg.2) and max(Arg.3). clamp(30, -30, 25) = 25 |
| |- | | |- |
| | inrange(number, number, number) || number || Returns 1 if Arg.1 is inbetween min(Arg.2) and max(Arg.3). | | | inrange(number, number, number) || number || Returns 1 if Arg.1 is inbetween min(Arg.2) and max(Arg.3). |