decorative banner

About vectors (PB only)


    In Motion Math, vectors contain values for properties that require two or more dimensions. For example, the Position property requires two dimensions: one for the x-coordinate and one for the y-coordinate. A vector for the Position property contains values for both dimensions, and is represented by the following format:

    {x, y}

    The x-coordinate specifies the number of pixels on the horizontal axis, and the y-coordinate specifies the number of pixels on the vertical axis.

    Likewise, a vector for a property involving color requires four dimensions, one for R, G, B, and the alpha channel, as shown in the following example:

    {133, 102, 54, 133}

    In Motion Math, the maximum number of dimensions vectors can use is four.

Related Subtopics: