mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-16 10:03:41 -07:00
removing trailing spaces
This commit is contained in:
parent
fa4e579b95
commit
a3df04999c
61 changed files with 2110 additions and 2103 deletions
|
@ -7,10 +7,10 @@ def get_power_of_two(x):
|
|||
while (1 << i) < x:
|
||||
i += 1
|
||||
return i
|
||||
|
||||
|
||||
def rotationMatrixToEulerAngles(R) :
|
||||
sy = math.sqrt(R[0,0] * R[0,0] + R[1,0] * R[1,0])
|
||||
singular = sy < 1e-6
|
||||
sy = math.sqrt(R[0,0] * R[0,0] + R[1,0] * R[1,0])
|
||||
singular = sy < 1e-6
|
||||
if not singular :
|
||||
x = math.atan2(R[2,1] , R[2,2])
|
||||
y = math.atan2(-R[2,0], sy)
|
||||
|
@ -18,8 +18,8 @@ def rotationMatrixToEulerAngles(R) :
|
|||
else :
|
||||
x = math.atan2(-R[1,2], R[1,1])
|
||||
y = math.atan2(-R[2,0], sy)
|
||||
z = 0
|
||||
z = 0
|
||||
return np.array([x, y, z])
|
||||
|
||||
|
||||
def polygon_area(x,y):
|
||||
return 0.5*np.abs(np.dot(x,np.roll(y,1))-np.dot(y,np.roll(x,1)))
|
||||
return 0.5*np.abs(np.dot(x,np.roll(y,1))-np.dot(y,np.roll(x,1)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue