Rotating back to original position causing it to not

I’m following the answer here that tells me how to make a rotation and bring it back to its original position: How to rotate back to original position? - Unity Answers

However, when it returns to the original position, its values end up slightly different until eventually, after each use of this method, the object ends up in a different location. The way I am using it is that the object is tied to my first person camera in game. It stays relative to the camera since the player moves it around with their mouse, but its rotation never returns to its original value.

Round off error will prevent any floating point math from coming out exact.

If you want to return to the exact position you left, save the transform’s value and just restore it