User Guide

546 Chapter 12: Methods
Parameters
loc
Required. Specifies the location in the referenced sprite. This location should be a point
relative to the sprite’s upper-left corner.
Example
This statement shows that the point (50, 50) within sprite 5 is equivalent to the vector
(-1993.6699, 52.0773, 2263.7446) on the projection plane of the camera of sprite 5:
put sprite(5).camera.spriteSpaceToWorldSpace(point(50, 50))
-- vector(-1993.6699, 52.0773, 2263.7446)
See also
worldSpaceToSpriteSpace, rect (camera), camera
sqrt()
Usage
sqrt(number)
the sqrt of number
Description
Math function (Lingo only); returns the square root of a specified number.
The value must be a decimal number greater than 0. Negative values return 0.
In JavaScript syntax, use the Math object’s
sqrt() function.
Parameters
number
Required. Specifies the number. This number is either a floating-point number or an
integer rounded to the nearest integer.
Example
This statement displays the square root of 3.0 in the Message window:
put sqrt(3.0)
-- 1.7321
This statement displays the square root of 3 in the Message window:
put sqrt(3)
-- 2
See also
floatPrecision