decorative banner

Variables (PB only)


    In Motion Math, variables do not need to be declared a particular type, such as integer or vector. Variables automatically assume the types you assign them. For example, if the variable P1 is assigned the value of sin(a), P1 is automatically a real or floating point number, in radians. If V1 is assigned a two-dimensional vector, such as {2, 7}, then V1 automatically becomes a vector with values 2 and 7 for its dimensions. For more information about vectors, see About vectors (PB only).

    The names of variables must adhere to the following requirements:

    • Must start with a letter, but can contain numbers after the first letter.
    • Cannot contain a space or operators.
    • Cannot be x or y, since this would conflict with vector indexing (see About vectors (PB only)). However, the name can contain the letter x or y.

    In addition, the Motion Math language is not case-sensitive. For example, the variables circle, CIRCLE, and Circle are identical in Motion Math.