ref equal check for matrix3x3