MPU6050 Gyro and Acc values

stepper.step (( newangle - offset ) / 1.8)

where newangle means the new angular position of the cencor after it moved in an axis. while offset is the starting angular value. Does this code would make my stepper motor to move required steps to stabilize ?