Distance()
On this page
Distance(first: Variant, second: Variant) -> floatMeasure matching Vector2/Vector3 or integer-vector values, or a numeric absolute difference.
Returns: Float; 0 for unsupported pairs.
Distance(Vector3.ZERO, Vector3(3, 0, 4))It does not automatically look up record/node positions from a proxy.
Format()#
Format(template: Variant, values: Variant = {}) -> StringReplace dictionary {key}, array {0}, or scalar {0}/{value} placeholders.
Returns: String.
Format("Score: {value}", 25)No embedded expression evaluation or translation registration is implied.
ToJSON()#
ToJSON(value: Variant, indent: String = "") -> StringSerialize ordinary data to JSON text.
Returns: String.
ToJSON({"open": true, "score": 5}, " ")FromJSON()#
FromJSON(text_value: Variant, fallback: Variant = null) -> VariantParse JSON text with an explicit parser and fallback on failure.
Returns: Parsed value or fallback.
FromJSON('{"open":true}', {})Valid JSON null remains null. Native vectors, resources and nodes need an explicit representation for portable JSON.
