mirror of
https://github.com/WinampDesktop/winamp.git
synced 2024-12-13 12:41:01 -05:00
19 lines
257 B
C++
Vendored
19 lines
257 B
C++
Vendored
#include "rar.hpp"
|
|
|
|
int ToPercent(int64 N1,int64 N2)
|
|
{
|
|
if (N2<N1)
|
|
return 100;
|
|
return ToPercentUnlim(N1,N2);
|
|
}
|
|
|
|
|
|
// Allows the percent larger than 100.
|
|
int ToPercentUnlim(int64 N1,int64 N2)
|
|
{
|
|
if (N2==0)
|
|
return 0;
|
|
return (int)(N1*100/N2);
|
|
}
|
|
|
|
|