コード例 #1
0
ファイル: geometry.py プロジェクト: sagarjhaa/Simulator_GUI
def reflect(x, y, x0, y0, d=1.0, a=180):
    """ Returns the reflection of a point through origin (x0,y0).
    """
    return coordinates(x0, y0, d * distance(x0, y0, x, y),
                       a + angle(x0, y0, x, y))
コード例 #2
0
ファイル: geometry.py プロジェクト: est/nodebox-gl
def reflect(x, y, x0, y0, d=1.0, a=180):
    """ Returns the reflection of a point through origin (x0,y0).
    """
    return coordinates(x0, y0, d*distance(x0,y0,x,y), a+angle(x0,y0,x,y))