Type:Float: Difference between revisions

From Resonite Wiki
mNo edit summary
m Fix category
Line 10: Line 10:
* [[Type:Float4 | float4]]
* [[Type:Float4 | float4]]


[[Category:Types]]
[[Category:Type]]
[[Category:Types:Value]]
[[Category:Type:Value]]

Revision as of 21:08, 14 January 2024

A float is a value type that that can store a floating-point decimal number in the approximate range ±1.5 x 10^−45 to ±3.4 x 10^38

In the underlying runtime (.net), this takes up 4 bytes of memory. For more information, refer to the Microsoft documentation on floating-point numeric types

Usage

Use this type whenever you need to store decimal numbers, but don't need high precision. Generally, you should try using one of the float variants first, before moving on to double, which uses twice the memory.

Related Types