fixup! fixup! first commit
This commit is contained in:
parent
a5221b52a5
commit
b9471f779e
@ -1,3 +1,5 @@
|
|||||||
|
from math import floor
|
||||||
|
|
||||||
def transform_mp_to_abc(m, p):
|
def transform_mp_to_abc(m, p):
|
||||||
"""transforme une équation de la forme y = mx + p to ax + by = c
|
"""transforme une équation de la forme y = mx + p to ax + by = c
|
||||||
|
|
||||||
@ -105,7 +107,7 @@ def symetrie_orthogonale(d, p):
|
|||||||
x, y = p
|
x, y = p
|
||||||
ap, bp, cp = droite_normale(d,p) # perpendiculaire passant par le point
|
ap, bp, cp = droite_normale(d,p) # perpendiculaire passant par le point
|
||||||
xi, yi = intersection((a,b,c), (ap, bp, cp))
|
xi, yi = intersection((a,b,c), (ap, bp, cp))
|
||||||
return xi, yi
|
return round((2*xi - x)*10)/10, round((2*yi - y)*10)/10
|
||||||
|
|
||||||
def distance_droite_point(d, p):
|
def distance_droite_point(d, p):
|
||||||
"""TODO: Docstring for distance_droite_point.
|
"""TODO: Docstring for distance_droite_point.
|
||||||
|
@ -27,7 +27,7 @@ def tests():
|
|||||||
test(droite_normale, (-0.5, 1, 1.0), (3, 4), (2.0, 1, 10.0))
|
test(droite_normale, (-0.5, 1, 1.0), (3, 4), (2.0, 1, 10.0))
|
||||||
|
|
||||||
test(symetrie_orthogonale, (-0.5, 1, 1.0), (-2, 0), (-2.0, 0.0))
|
test(symetrie_orthogonale, (-0.5, 1, 1.0), (-2, 0), (-2.0, 0.0))
|
||||||
test(symetrie_orthogonale, (-0.5, 1, 1.0), (3, 4), (2.0, 1, 10.0))
|
test(symetrie_orthogonale, (-0.5, 1, 1.0), (3, 4), (4.2, 1.6))
|
||||||
|
|
||||||
test(distance_droite_point, (-0.5, 1, 1.0), (-2, 0), 0.0)
|
test(distance_droite_point, (-0.5, 1, 1.0), (-2, 0), 0.0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user