GetPercent

 

GetPercent ÇÔ¼ö´Â ºñ·Ê°ªÀ» ¾ò´Â ÇÔ¼ö·Î ´ÙÀ½°ú °°ÀÌ »ç¿ëÇÑ´Ù.

 

double @GetPercent(double curr, double base, double full, double target_base, double target_full);

 

ÇÔ¼öÀÎÀÚ

double curr - °è»êÇÒ °ª

double base - ¿ø·¡ °ªÀÇ base

double full - ¿ø·¡ °ªÀÇ full

double target_base - °è»êÇÒ base

double target_full - °è»êÇÒ full

 

return °ª

target ¹üÀ§·Î ȯ»êµÈ °ªÀÌ µ¹¾Æ¿Â´Ù.

 

r = @GetPercent(value, 0, 100, 50, 200);

¹®Àå¼³¸í : r = value x (200-50)/(100-0)+50 °ªÀ» ¾ò´Â´Ù.

 

½ºÅ©¸³Æ® ÀÛ¼º ¿¹)

loop = @AiCurr("loop");

curr = @AiCurr("count");

if(loop == 0) {

return @GetPercent(curr, 0, 100, 40, 100);

}

if(loop == 1) {

return 100;

}

return @GetPercent(curr, 0, 100, 100, 40);