increase a certain ratio value

hello guys

on my game i have a player input from 0 to 1 based on mouse y axis.

to score i have to get 2 point, so it should go from 0 to 1 and go back, for the next score the variable in this case i’ll call

float _score;

i have to increase it by a constant of 1.2f, so it will be 2.4 (2 * 1.2)
then with mathf.floor i get an int of 2, so i want to create an algorithm that take the floor throwed 0.4f then add it to the constant of 1.2, so i’ll get an constant of 1.6 on the next time that player scored, so it’s are going to be harder

i can’t figure out how to do it (mathematically)

ok well itàs a game where i have to cut a stuff that i have on front of the camera, to simulate a °cut° iàm using the mouse y axis for the movement, it go from 0 to 1 range ( i modified it myself), for cut the first stuff i have to make 2 complete cut so from 0 to 1 = 1, the go back from 1 to 0 = 2, now let me name do an example

float _cut’;
float _numofCut = 2;

if ( _cut > _ numofCut)
{
//do stuff
}

after the first cut i want to increase _numofCut by a ratio of 1.2, then round it with floor by do (_numofCut * 1.2) that should give me back again 2 and throw the 0.4, what i want is an algorrithm that add this 0.4 to the variable _constant that in my case for the next step will be multiplied as this (_numofCut * 1.6) and so on.

for make it more easy to understand let me assign a value of 1.2 to a variable

float _ constant = 1.2f;

i hope that now it’s more clear.

Sorry, it’s still hard to understand what you want exactly. But I tried my best. Would this work?

private float GetNextModifier(float lastModifier, int numOfCut)
{
      float modifiedCut = numOfCut * lastModifier;
      float remainder =  modifiedCut - mathf.floor(modifiedCut);

      return lastModifier + remainder;
}

private void Update()
{
    float _constant = 1.2f;
    int numOfCut = 2;
    if(cut > numOfCut)
    {
        //do something
        _constant = GetNextModifier(_constant, numOfCut);
       numOfCut = numOfCut * _constant;
    }
}