コード例 #1
0
int main(int argc, char** argv) {
	ifstream file(argv[1]);
	while (!file.eof()) {
		string line;
		getline(file, line);
		if (!line.empty()) {
			Circle c;
			Point p;
			getCircle(line, &c);
			getPoint(line, "Point", &p);
			if (c.containsPoint(p)) cout << "true";
			else cout << "false";
			cout << endl;
		}
	}

	return 0;
}
コード例 #2
0
bool Intersection::test(const Circle& a, const Vec2& b) {
	return a.containsPoint(b);
}