Because 480/768 is zero, when you're dealing with integers. Convert them to float before doing the division. Like this:
float iPorcentage = ((float)iDrawedHeight)/(float)iScreenHeight;
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 5 of 5
Thread: conversionsThreaded View
|
Click Here to Expand Forum to Full Width |