Skip to content

Instantly share code, notes, and snippets.

@deque-blog

deque-blog/intersect.cpp

Last active Sep 13, 2017
Embed
What would you like to do?
template<typename Coordinate>
Shape<Coordinate> allSpace() {
return [](Coordinate const&) {
return true;
};
}
template<typename Coordinate>
Shape<Coordinate> intersect(Shape<Coordinate> const& lhs, Shape<Coordinate> const& rhs) {
return [=](Coordinate const& coord) {
return lhs(coord) && rhs(coord);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.