About Adxl345 accelerometer to measure the angle of inclination

Hello everyone,
I have heard that the Adxl345 accelerometer could be used to measure the angle of inclination. Doest anyone have some sample code about this?

Thank you

Is google borken today?