How to change Decal's rotation at runtime relative to the floor or wall? C++

I thought I would have to declare a function then write the crossproduct calculation from scratch within the declared function. Just the fact that there is a static member function specifically for cross products is pretty cool.