Depends on the Parameter set up of the machine
IF the Parameter is turned on for straight line rapid that's what it will do
IF you want to go to the point Straight line -G01 X5.0 Y10.0 F500.0 and will always arrive at the point together
Goo X5.0 and Y10.0 depends on the above parameter setting