# tf2 How to generate rotation matrix from axis-angle rotation?

Is there a build-in `tf2`

functionality where we can generate a rotation matrix given an axis (`tf2::Vector3`

) and an angle (`double`

). E.g.
Suppose you have:

```
tf2::Vector3 vec(2,3,4); // by axis I mean - any - axis, not just x,y,z
double angle_rads=1.57;
tf2::Matrix3x3 rotation_matrix(vec,rads); // <-- is there an easy way like this?
```

Thanks!