Support non-square elements in regular quad mesh generation

as titled
indentation is wrong and you could reduce intentation by testing ```if (!isInputOk)``` and returning if true.