YarnNumber
Yarn numbers are 32-bit floats. Godot floats are 64-bit doubles, so every number needs to be snapped to float32 width and displayed with float32 shortest-round-trip formatting to match the other runtimes.
class_name YarnNumber
extends RefCountedInherits from RefCounted
#Methods
#round_half_to_even(float)
static func round_half_to_even(v: float) -> floatParameters
vfloat
Returns float
#to_display_string(float)
Formats a number for dialogue display: the shortest decimal that round-trips back to the same float32 value, in plain decimal notation for magnitudes in [0.0001, 1e9), scientific otherwise.
static func to_display_string(v: float) -> StringParameters
vfloat
Returns String
#to_f32(float)
Rounds a double to the nearest representable 32-bit float value.
static func to_f32(v: float) -> floatParameters
vfloat
Returns float
#to_int32(float)
static func to_int32(v: float) -> intParameters
vfloat
Returns int
Generated from Yarn Spinner for Godot GDScript 3.3.