MaxiEnv setAttack

for the setAttack method in maxiEnv wouldn’t it be

void oscEnv::setAttack(double attackMS) {
    attack = attackMS;

why is it multiplying the sampleRate and a value of 0.001?

void oscEnv::setAttack(double attackMS) {
    attack = 1-pow( 0.01, 1.0 / ( attackMS * sampleRate * 0.001 ) );

Edit: I thought about it and I realized it’s because thats how its actually manipulating when the sound comes in for the attack, however, could someone still explain to me this algorithm of how this works please,

sampleRate * 0.001 gives the number of samples per millisecond, I’m not sure what the
1 - 0.01 to the power of (1 / numberOfSamplesInAttack)
is all about

I believe its because its an exponential volume ramp.

However I also have trouble with this as it does not seem to have the correct temporal values.
I have a 10000 ms attack (10 seconds) however the attack tops out at about 4 seconds, which is weird…