Can't make Mathf.Clamp work

I’m making a runner where the speed should vary a little so that the character’s not always on the same point, and I’m having troubles with the Clamp function.
I searched for it and came across another question about it here, where the answer was something similar to what I’m doing, but it doesn’t work for me.

This is my code

    private float boost = 1;
	private float acc = 0;

	void Update(){
		acc = Mathf.Clamp(acc, -boost, boost);
		print (acc);
		rigidbody2D.velocity = new Vector2(acc, 0f);
	}

I’m printing the acc value and the only number I’m getting is 0, which is its initial value.
Please I need help with this function couse it’s driving me mad.
Thanks in advance.

I’m not sure what you are trying to do, but Mathf.Clamp() is working as expected. That is, Clamp makes sure a value is in the range specified. You are specifying that ‘acc’ be in the range of -1 to 1. Your value 0 is in that range, so Clamp() does not change it. And nothing in this code changes that value. You need something here that modifies the value of acc beyond the range of -1 to 1 before Clamp() will change the value.