N
neverstill
Hello-
I need to calculate the aspect ratio of an image. This is stumping me...
int w = 190;
int h = 260;
decimal r = w/h; // this is always 0
Now, I have never tried to do this before, I have never even worked with a
decimal before.. so I may be missing some modifier, but I can't find much
online.
the above code should have yielded: 0.73
What am I missing?
Thanks for any help!
Steve
I need to calculate the aspect ratio of an image. This is stumping me...
int w = 190;
int h = 260;
decimal r = w/h; // this is always 0
Now, I have never tried to do this before, I have never even worked with a
decimal before.. so I may be missing some modifier, but I can't find much
online.
the above code should have yielded: 0.73
What am I missing?
Thanks for any help!
Steve