Logically, the amendment says "the right of the people...shall not be infringed". Clearly, if it is legal for New York to pass a law prohibiting .50 caliber machine guns, there can be only one conclusion consistent with the Constitution, and that is that the inhabitants of New York are not really people.
Either that, or the Constitution is being violated. Take your pick.
There could be a second conclusion - that the second amendment only limits federal laws not state laws.