Speed of a particle in a cartesian plane