Don't click here unless you want to be banned.

LSL Wiki : ExampleStringVector

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
Small script I use to get a vector with floats into a vector string.
IE: <1.123, 1.345, 555.123> returns <1, 1, 555> as a string.
Dunno, pretty useless.
string llVector2String(vector w)
{
    integer x = (integer)w.x;
    integer y = (integer)w.y;
    integer z = (integer)w.z;
    string xx = (string)x;
    string yy = (string)y;
    string zz = (string)z;
    return "<" + xx + "," + yy + "," + zz + ">";
}

I modified your version to reduce the bulk. -KryptHax

string llVector2String(vector w)
{
    return "<" + (string)llRound(w.x) + "," + (string)llRound(w.y) + "," + (string)llRound(w.z) + ">";
}
There is one comment on this page. [Display comments/form]