A nice article on Code Project by a great guy, Super Lloyd.
To quote:
“I needed to find the distance from a Point to a Bezier Segment. Turns out you need lot of Math tools. A polynomial class which can do simple math, derivate and find its roots. As well as Complex arithmetic.”