Math3D.MatrixToAngles does not return roll, pitch, yaw angles as the documentation states. It instead returns yaw, pitch, roll angles.
Additionally the function in the example RollPitchYawMatrix does not exist. It's YawPitchRollMatrix.
/** \brief Returns angles of rotation matrix \param mat \p vector[3] rotation matrix \return \p vector roll, pitch, yaw angles @code vector mat[3]; Math3D.RollPitchYawMatrix( "70 15 45", mat ); vector ang = Math3D.MatrixToAngles( mat ); Print( ang ); >> <70,15,-45> @endcode */ proto static vector MatrixToAngles(vector mat[3]);