Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def distance_point_line(p, a, b):
	return abs((p.x - a.x) * (b.y - a.y) - (p.y - a.y) * (b.x - a.x)) / math.sqrt((b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y))
        


src/p/y/Py2D-HEAD/py2d/Bezier.py   Py2D(Download)
"""
 
from py2d.Math import Vector, distance_point_line
 
 
def __bezier_flatness(p1,p2, *c):
	return max(distance_point_line(cp, p1, p2) for cp in c)
 

src/p/y/py2d-0.1/py2d/Bezier.py   py2d(Download)
"""
 
from py2d.Math import Vector, distance_point_line
 
 
def __bezier_flatness(p1,p2, *c):
	return max(distance_point_line(cp, p1, p2) for cp in c)