Last active
September 13, 2017 11:10
-
-
Save deque-blog/7d8c05b49d49807c9ab7222aa5f78215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class Coordinate> | |
using Shape = std::function<bool (Coordinate const&)>; | |
using Coord2D = std::pair<double, double>; | |
using Shape2D = Shape<Coord2D>; | |
template<class Coordinate> | |
Shape<Coordinate> outside(Shape<Coordinate> const& s) { | |
return [=](Coordinate const& coord) { | |
return not s(coord); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment