I feel bad writing this answer, but hopefully this will prevent all other answers and close the ticket.
private static int ToPercentage(double d)
{
return (int)(d*100);
}
EDIT: Thanks Devid for the suggestion 🙂 TIL how to make an answer a community wiki post!
2
solved Converting decimal percentage to int