Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/external_dependencies/openmpt-trunk/include/unrar/smallfn.cpp

20 lines
257 B
C++
Raw Normal View History

2024-09-24 12:54:57 +00:00
#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);
}