MAP and CONSTRAIN bot don't work properly

Hi !
I am using an Arduino nano 33 IoT, and I want to put the data coming from my accelerometer in a range from 0 to 100. I have tried map function, constrain function and both together, but I always end up having values that exceed 100.
Here is the relevant part of my code :

float x, y, z;            //for Accelero
float a, b, c;            //for Gyro
int degreesX = 0;
int degreesY = 0;
int degreesZ = 0;
int degreesXconstrain = 0;

void IMUGetData(){
  if (IMU.accelerationAvailable()) {
    IMU.readAcceleration(x, y, z);
    }
    
   if (x > 0.1) {
    x = 100*x;
    degreesX = x/1.095;
    Serial.print("Tilting up ");
    Serial.println(degreesX);
    Serial.print ('\t');
   }
  
   if (x < -0.1) {
    x = -100*x;
    degreesX = x/1.095;
    Serial.print("Tilting down ");
    Serial.println(degreesX);
    Serial.print ('\t');
   }

    degreesX = map(degreesX, 0, 365, 0, 100);
    degreesXconstrain = constrain(degreesX, 0, 100);

}

Thanks for your help !

In the above function snippet, the program is Serial.printing values before mapping them.
Difficult to guess what otherwise may be happening outside of this function because we don't have the complete code.

If my memory is working the map command does not work with floats but I cannot see what you are doing because your secret code is not visible.

To use an accelerometer for measuring tilt angles (pitch and roll), and get actually useful values, I recommend following this tutorial:
https://wiki.dfrobot.com/How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing