Number: Difference between revisions
Nikitaivanov (talk | contribs) (Created page with "File:Number1.png Outputs a given value. To change the value to output, select the block, then tap the button right below the open inventory (+) button, in the bottom right corner. File:changenumvalue.png This will open up the keypad, which you can use to change the value that the number script block will output. == Notes == The number is the most common data type. Numbers are represented by blue wires. Numbers are stored as 32-bit floats. To be precise, th...") |
RandomName (talk | contribs) mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Block | |||
|image=Number.png | |||
|type=s | |||
|folder=Values | |||
|output1={{Port|n}} | |||
}} | |||
Outputs a given value. | Outputs a given value. | ||
Line 5: | Line 10: | ||
To change the value to output, select the block, then tap the button right below the open inventory (+) button, in the bottom right corner. | To change the value to output, select the block, then tap the button right below the open inventory (+) button, in the bottom right corner. | ||
[[File: | [[File:Number_change_value.png|none|thumb]] | ||
This will open up the keypad, which you can use to change the value that the number script block will output. | This will open up the keypad, which you can use to change the value that the number script block will output. | ||
Line 13: | Line 18: | ||
The number is the most common data type. Numbers are represented by blue wires. | The number is the most common data type. Numbers are represented by blue wires. | ||
Numbers are stored as 32-bit floats. To be precise, they are stored as [https://en.wikipedia.org/wiki/Single-precision_floating-point_format#IEEE_754_standard:_binary32 | Numbers are stored as 32-bit floats. To be precise, they are stored as [https://en.wikipedia.org/wiki/Single-precision_floating-point_format#IEEE_754_standard:_binary32 IEEE-754 floating point numbers]. | ||
This gives numbers a maximum value of | This gives numbers a maximum value of | ||
:340,282,346,638,528,859,811,704,183,484,516,925,440. | |||
Likewise, their minimum value is the negative of that. | |||
Numbers have about 7 digits of precision. This means that numbers with 8 digits or more may begin to give slightly inaccurate results, e.g. when [[Add Numbers|adding]] numbers together. The margin of error is usually tiny, but gets larger the more digits you have. | Numbers have about 7 digits of precision. This means that numbers with 8 digits or more may begin to give slightly inaccurate results, e.g. when [[Add Numbers|adding]] numbers together. The margin of error is usually tiny, but gets larger the more digits you have. | ||
Line 25: | Line 34: | ||
* [[Vector]] | * [[Vector]] | ||
* [[Rotation]] | * [[Rotation]] | ||
[[Category:Blocks]] | [[Category:Blocks]] |
Latest revision as of 13:55, 3 June 2024
Type | Script block |
Collider | None |
Folder | Values |
Ports | |
---|---|
Outputs | Number |
Outputs a given value.
To change the value to output, select the block, then tap the button right below the open inventory (+) button, in the bottom right corner.

This will open up the keypad, which you can use to change the value that the number script block will output.
Notes
The number is the most common data type. Numbers are represented by blue wires.
Numbers are stored as 32-bit floats. To be precise, they are stored as IEEE-754 floating point numbers. This gives numbers a maximum value of
- 340,282,346,638,528,859,811,704,183,484,516,925,440.
Likewise, their minimum value is the negative of that.
Numbers have about 7 digits of precision. This means that numbers with 8 digits or more may begin to give slightly inaccurate results, e.g. when adding numbers together. The margin of error is usually tiny, but gets larger the more digits you have.
Numbers using decimals may also give rounding errors as well.