Returns whether the given argument is a matrix.



Argument Description
n The argument to check.

Returns: Boolean


This function returns whether a given variable refers to a matrix or not. In some cases you want to check and see what data type a variable holds in GameMaker: Studio and that's when you would use this function. It returns true or false depending on whether the value is a matrix or not. For further information on data types see here, and to find out more about the matrix functions see: 3D Transforms.


if !is_matrix(val)
   show_debug_message("Not a valid matrix!");

The above code checks the variable "val" to see if it contains a matrix and if it is not then it shows a message in the debug console.

Back: Data Types
Next: is_undefined
© Copyright YoYo Games Ltd. 2018 All Rights Reserved