Given a vector, anyone know the quickest way to mirror it, using maths?
Let's use 2D (x,y) to make it simpler: say I have a vector x=-1 y=1 and I want to mirror it so it becomes x=1 y=1. In this instance I can just negate the x but I want it to work whatever the vector. e.g. with x=0 y=1, negating the x makes no difference, I want it to become x=0 y=-1.
I know I could use TFormVector on a pivot or something, but I want to find a quicker(?) way using maths.
Cheers.
[edit]Yikes. I guess this isn't going to be a simple as I'd hoped because I need to figure into the equation the axis I want to mirror around. :/
Let's use 2D (x,y) to make it simpler: say I have a vector x=-1 y=1 and I want to mirror it so it becomes x=1 y=1. In this instance I can just negate the x but I want it to work whatever the vector. e.g. with x=0 y=1, negating the x makes no difference, I want it to become x=0 y=-1.
I know I could use TFormVector on a pivot or something, but I want to find a quicker(?) way using maths.
Cheers.
[edit]Yikes. I guess this isn't going to be a simple as I'd hoped because I need to figure into the equation the axis I want to mirror around. :/