Yes, the formula for a 180-degree rotation is the same for both clockwise and counterclockwise directions. This applies to both the x and y coordinates.
When you rotate a point (x, y) by 180 degrees, regardless of the direction (clockwise or counterclockwise), the new coordinates will be (-x, -y). This means that both the x and y values are negated.
For example, if you have a point at (3, 4), after a 180-degree rotation, it will be at (-3, -4). This holds true whether you rotate the point clockwise or counterclockwise.
In summary, the formula for a 180-degree rotation is consistent in both directions and affects both the x and y coordinates equally.