I have following code for my vector:
For those looking for the fourth variant, to flip something upside down, the code looks like this: