public boolean isOnPoint(double mx, double my) {
        if (state == DeliverState.delivered)
            return false;
        double x = edge.from.getX() * (1.0 - position) + edge.to.getX() * position;
        double y = edge.from.getY() * (1.0 - position) + edge.to.getY() * position;
        // Tu sa da nastavovat velkost trojuholnika
        double rR = 12.0;
        double ux = edge.from.getY() - edge.to.getY(), uy = edge.to.getX() - edge.from.getX();

        double k = rR / Math.sqrt(ux * ux + uy * uy);
        double vx = ux * k;
        double vy = uy * k;
        double side1 = side(x, y, x + vx + vy * 0.5, y + vy - vx * 0.5, mx, my);
        double side2 = side(x + vx + vy * 0.5, y + vy - vx * 0.5, x + vx - vy * 0.5, y + vy + vx
                * 0.5, mx, my);
        double side3 = side(x + vx - vy * 0.5, y + vy + vx * 0.5, x, y, mx, my);
        if (side1 * side2 > 0 && side2 * side3 > 0 && side2 * side1 > 0)
            return true;
        return false;
    }