School Survival Forums
close this thread - Printable Version

+- School Survival Forums (
+-- Forum: Learning, Youth Rights and School Survival (/forumdisplay.php?fid=3)
+--- Forum: Homework Help & Answers (/forumdisplay.php?fid=30)
+--- Thread: close this thread (/showthread.php?tid=4815)

close this thread - Ceiling Cat - 04-14-2010 07:10 PM

I can't believe I forgot such a basic thing. Not homework, but still relevant I hope.

I have values for max health and current health (integer), and a variable that specifies a health bar's size at 100%.

How do I calculated current healthz in pixels?

I'm not sure if it's maximum pixels / (max health / current health). Something seems off about this solution for me.

edit: Fuck it, never mind. I found it. [cval*sizx/mval]