Slope detection, almost perfect.
It can be used in platformers, engines etc. Just remember to give credit. @FUNUT for the FPS counter The rest by me.