There's no single law. Is there a law in Somalia that allows US killing arbitrary people there, unilaterally? Is there such a law in Yemen? Syria? In Syria if you follow the letter of the law, and intention of the (idiot) leader there, he's against the US involvement, it would be a murder. What law was in Vietnam, that killing was somehow justified by it?
In international arena, there's no universal law.
Some idiots killed a few thousands Americans, and then some Americans did go on a killing rampage as a revenge, murdering 10s of thousands mostly unrelated people. That's about how it looks from the outside.