That's exactly what a function is supposed to do: Some specific task. By checking the current mirror position, you can either call the function again if the position is not where you want it, or bypass the call using your if statement.
That's exactly what a function is supposed to do: Some specific task. By checking the current mirror position, you can either call the function again if the position is not where you want it, or bypass the call using your if statement.