About skew factor value of applyTransform

About the x skew factor of applyTransform function.
Does it equal to the angle I need? or what ? But I find the result is wrong if I input the angle value directly.

For example, if I want to let it skew 60°, what is the value of x/y skew factor?

My version is 2.6.5(1329)
Thanks.

Which text editor are you using for coding?

See the transform snippet in the Python for Glyphs repository:

The skewing uses an angle. But that only is what you expect for 10–20°. With bigger angles, it behaves strange. That is not a bug, just how the math for skewing works.

But I think it runs wrong, my macro script as below:
'"
thisLayer = Glyphs.font.glyphs[‘X000’].layers[0]

thisLayer.applyTransform((
1.0, # x scale factor
1.0, # x skew factor
0.0, # y skew factor
1.0, # y scale factor
0, # x position
0 # y postion
))
"’


I found 2 questions:
1.The x skew factor value is 1.0, but it changed so big if it’s angle.I think the result is wrong.
2.The x skew and y skew factor is reversed.

Please.

Yes. The second figure is the y shear and the third figure the x shear. Did I write that wrong somewhere?

Now the description is wrong in https://docu.glyphsapp.com/.
And can you help to check the first question?

It is more complicated than that. If you want to read up on how the value matrix works:

And specifically about shearing (skewing):

Technically, it is the tangens of the angle:

import math
skewAngle = 10 # in degrees
xSkew = math.tan(math.radians(skewAngle))
matrix = (1, 0, xSkew, 1, 0, 0)