Example #1
0
double Touch::distance(const Touch &t) const
{
    int x_dst = this->getCoordinates().x - t.getCoordinates().x;
    int y_dst = this->getCoordinates().y - t.getCoordinates().y;
    return sqrt(x_dst*x_dst + y_dst*y_dst);
}