User Guide

359
magnitude
Syntax
whichVector.magnitude
Description
3D property; returns the magnitude of a vector. The value is a floating-point number. The
magnitude is the length of a vector and is always greater than or equal to0.0. (vector (0, 0, 0)
equals 0.)
Example
This statement shows that the magnitude of MyVec1 is 100.0000 and the magnitude of MyVec2
is 141.4214.
MyVec1 = vector(100, 0, 0)
put MyVec1.magnitude
-- 100.0000
MyVec2 = vector(100, 100, 0)
put MyVec2.magnitude
-- 141.4214
See also
length (3D), identity()
makeList()
Syntax
parserObject.makeList()
Description
Function; returns a property list based on the XML document parsed using parseString() or
parseURL().
Example
This handler parses of an XML document and returns the resulting list:
on ConvertToList xmlString
parserObject = new(xtra "xmlparser")
errorCode = parserObj.parseString(xmlString)
errorString = parserObj.getError()
if voidP(errorString) then
parsedList = parserObj.makeList()
else
alert "Sorry, there was an error" && errorString
exit
end if
return parsedList
end
See also
makeSubList()