Skip to content

Function: vectorToString()

ts
function vectorToString(target: Nillable<Readonly<vector>>): string;

Convert a vector to the engine debug string format.

Not @inline: the target ? … : NIL truthiness test on a non-boolean object folds to a condition and … or … at every call site, which tstl flags ("Only false and nil evaluate to 'false'"). As a debug/logging formatter it gains nothing from inlining, so it stays a regular call.

Parameters

ParameterTypeDescription
targetNillable<Readonly<vector>>Vector to stringify, or nil-like value.

Returns

string

String in [x:y:z] format, or nil.