Fandom

武装突袭 Wiki

Number

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Number Type编辑

A real number, i.e. 1, -25, 6.52, 1805.6352

Numbers are stored as single precision floating point numbers, which allow for a large range of values with limited precision (generally accurate to 6 or 7 decimal places).

The largest real positive number that can be entered via script is: 3.4028235e38

The largest real negative number that can be entered via script is: -3.4028235e38

Larger numbers: In scripts it is possible to generate a representation of an infinite positive or negative number which compares even larger or smaller than the above two floating point limits;

Positive infinity 1e39 = "1.#INF"

Negative infinity -1e39 = "-1.#INF"

Indeterminate (NaN) = "-1.#IND"


The finite command can be used to verify if a number represents infinity or NaN.

Hex numbers编辑

Arma supports hexadecimal numbers in both scripts and configs. Most common notation for hex numbers is 0x followed by the hexadecimal value. Alternatively symbol $ can be used for the same thing. It is also possible to mix and match notations:

hint str 0xFF; //255 hint str $FF; //255 hint str (0xFF + $FF + 255); //765

Degrees编辑

Degrees are a poetic licence used to indicate a number returned from functions like acos and asin

It's special properties are that it will always supply a value from 0 to 360

Radians编辑

Another poetic licence for a Number. Used in angular math computations with commands like rad and deg

Scripting vs Addons编辑

Integers and Floats编辑

Note that unlike config.cpp's (addons), a Number in scripting language is ANY numeric entity. Floats, or integers. It is NOT the same as a config's Integer or Float. Number covers both types.

Booleans编辑

Note also, unlike config.cpp's, Boolean is a real type in scripting language. In addons, it is a poetic licence for a zero/non zero Integer. In Arma 3 command parseNumber has been extended to accept booleans:

hint str parseNumber true; //1

更多维基

随机维基