MPU6050: Additive Angle Output

Using MPU6050, is it possible to have the angles additive? Meaning the more you rotate the MPU6050, the angle increases and decreases with no limitations. For example, spin MPU6050 around 2 times clockwise, it will output 720 instead of 0, or spin MP6050 around 3 times counterclockwise, it will output -1080.

I use this library: GitHub - ElectronicCats/mpu6050: MPU6050 Arduino Library

I use this formula: Angle = (ypr[0] * 180 / M_PI)
The formula outputs angle ranging -180 to 180

In the code I include these libraries:

#include <Wire.h>
#include "MPU6050_6Axis_MotionApps20.h"
#include <MPU6050.h>

Gyro give you instant velocity of the circular motion.
So it will give you value (positive or negative according to the direction of the rotation) different from zero when in motion, and 0 when at rest.

To achieve what you want, you need to create a value into your code, detect the speed given by the gyro between a known delay, then divide the speed by the elapsed time.
There, you can have as a result, the relative position of the gyro from the start.

I use it as a compass on my arduino driven toy car, and make reset of the value when lower than 0 or +360.

Is it clear?

EDIT: here is my code, hope it may helps.

void MET_A_JOUR_CAP() { // function to update periodically position : "CAP"

  int32_t shift = GYRO_Z.VALEUR() * (time_new_mesure - time_last_mesure);  // GYRO_Z.VALEUR() extract the instant circular velocity from the IMU. Shift: relative displacement from previous state
  shift = shift * 1000 / 1024;                                             // horloge 1024 ticks / 1000 ms
  shift = shift * 180 / 160;                                               // observé: 1/2 tour affiche 160 au lieu de 180  // biais correction
  shift = shift * 500 / 32768;                                             // échelle gyroscope 500 degrés par sec // gyro scale: 500 dps/sec

  CAP -= shift; // the last known CAP value is corrected with the calculated relative displacement 

  if (CAP > 359999) { CAP -= 360000; } // please note the scale: 360000 instead of 360 (spare me a conversion)
  if (CAP < 0) { CAP += 360000; }
}

Very simple. Just integrate the rotation rates with respect to time to get angles as usual, but do not take the result modulus 360.

Be sure to calibrate the gyro before startup or the drift will be intolerable.

Don't forget to post your code, using code tags.