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

How would I form a function using this term and what is a cross product?