Skip to content

Commit 982f5ad

Browse files
committed
Fixes mustache rotation
1 parent 9188fb0 commit 982f5ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mustachio/factories.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# of the upper lip, and the bottom-center of the stache
3131
# is mapped to the center of the mouth
3232

33-
rotation = 90.0 - (Math.atan(( face['mouth_center']['y'] - face['nose']['y'] ).to_f / ( face['mouth_center']['x'] - face['nose']['x'] ).to_f ) / Math::PI * 180.0)
33+
rotation = -90.0 + (Math.atan(( face['mouth_center']['y'] - face['nose']['y'] ).to_f / ( face['mouth_center']['x'] - face['nose']['x'] ).to_f ) / Math::PI * 180.0)
3434
desired_height = Math.sqrt(
3535
( face['nose']['x'] - face['mouth_center']['x'] ).to_f**2 +
3636
( face['nose']['y'] - face['mouth_center']['y'] ).to_f**2

0 commit comments

Comments
 (0)