where I is the current in amperes, n is the number of turns of the coil and r is the radius of the coil. These two perpendicular magnetic fields add vectorially, and the compass needle points along the direction of their resultant BH+B. The current in the coil causes the compass needle to rotate by an angle θ: