Spin object to the specific angle with a deceleration. I'm not the author of this addon, I just ported it.
Simple example of how the Rex_Turntable behavior works