Given a point (x1, y1) and an equation for a line (y=mx+c), I need some pseudocode for determining the point (x2, y2) that is a reflection of the first point across the line
Reflection can be found in two steps. First translate (shift) everything down by b units, so the point becomes V=(x,y-b) and the line becomes y=mx. Then a vector inside the line is L=(1,m). Now calculate the reflection by the line through the origin,
(x',y') = 2(V.L)/(L.L) * L - V
where V.L and L.L are dot product and * is scalar multiple.
Finally, shift everything back up by adding b, and the final answer is (x',y'+b).
As an affine transformation you can write the above operation as the composition (product) of three matrices, first representing the shift y => y-b, then the reflection through the line through the origin, then the shift y => y+b:
[ 1 0 0] [(1-m^2)/(1+m^2) 2m/(1+m^2) 0] [ 1 0 0] [x]
[ 0 1 b] [ 2m/(1+m^2) (m^2-1)/(1+m^2) 0] [ 0 1 -b] [y]
[ 0 0 1] [ 0 0 1] [ 0 0 1] [1]
The situation is very similar to rotation matrices in affine geometry. If you already have matrix multiplication routines available, because you're also doing rotations for example, this might be the most maintainable way of implementing reflections.