health bar questions

I want to make a health bar that is based on percents. I want the bar to go from 1-100% using guitextures. The thing I’m not sure about is the coding to comare it to large numbers.

example:

you have 1000/1000 hp when it reaches 500/1000 hp then the percent displays 50% and I want this to happen for 1-100%

Anyone know how I would go about coding this ?

currentValue / maxValue * 100 = percentage;

Also see: