I want to clamp rotation along the x-axis.
let swipeDelta = 0;
if (this.touching) // moving touch on device
{
swipeDelta = this.currentPosition.y - this.startPosition.y;
this.currentRotation.copy(this.entity.getLocalEulerAngles());
// clamp x rotation
//this.currentRotation.x = pc.math.clamp(this.currentRotation.x, -45, 0)
this.entity.rotateLocal(-swipeDelta * this.speed, 0, 0);
}