Calculates the distance squared between two vectors.