diff --git a/React/Views/RCTConvert+Transform.m b/React/Views/RCTConvert+Transform.m index 1286553c5..116391056 100644 --- a/React/Views/RCTConvert+Transform.m +++ b/React/Views/RCTConvert+Transform.m @@ -118,13 +118,11 @@ static const NSUInteger kMatrixArrayLength = 4 * 4; } else if ([property isEqualToString:@"skewX"]) { CGFloat skew = [self convertToRadians:value]; - transform.m21 = sinf(skew); - transform.m22 = cosf(skew); + transform.m21 = tanf(skew); } else if ([property isEqualToString:@"skewY"]) { CGFloat skew = [self convertToRadians:value]; - transform.m11 = cosf(skew); - transform.m12 = sinf(skew); + transform.m12 = tanf(skew); } else { RCTLogError(@"Unsupported transform type for a CATransform3D: %@.", property); diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java index 525618a2b..aacc78ca5 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/MatrixMathHelper.java @@ -426,13 +426,11 @@ public class MatrixMathHelper { } public static void applySkewX(double[] m, double radians) { - m[4] = Math.sin(radians); - m[5] = Math.cos(radians); + m[4] = Math.tan(radians); } public static void applySkewY(double[] m, double radians) { - m[0] = Math.cos(radians); - m[1] = Math.sin(radians); + m[1] = Math.tan(radians); } public static void applyRotateX(double[] m, double radians) {