# How do I rotate a face around an axis in normal orientation in Python?

I have a set of vertices for a BMFace that I'm trying to rotate around the x-axis but in the face's normal orientation. Currently I'm doing:

c = face.calc_center_median()
T = Matrix.Translation(-c)
rot_angle = 0.25
rot_axis = (1, 0, 0)
bmesh.ops.rotate(
bm,
space=T,
matrix=Matrix.Rotation(rot_angle, 4, rot_axis),
verts=face.verts
)


My guess is that I can get the normal x-axis through face.normal but I'm not sure what to do next or how to best formulate the question to learn more. There are an infinite number of possible x-axes orthogonal to face.normal, aren't there?

tangent = face.calc_tangent_edge_pair()

This seems dependent on which edges are the longest (the documentation for BMFace.calc_tangent_edge_pair says: "Return face tangent based on the two longest disconnected edges."), so I imagine there's a better way to approach this!