Programming 4 - A quick Question

Put your programming skills to the test in these challenges.

Programming 4 - A quick Question

Post by seth_slade on Wed Jun 18, 2008 9:13 pm
([msg=5214]see Programming 4 - A quick Question[/msg])

What should I do about the decimal places in the values given in the xml file? Obviously, I cannot draw half a pixel. Should I just round them or what?
seth_slade
New User
New User
 
Posts: 4
Joined: Wed May 28, 2008 5:34 pm
Blog: View Blog (0)


Re: Programming 4 - A quick Question

Post by BhaaL on Thu Jun 19, 2008 11:07 am
([msg=5271]see Re: Programming 4 - A quick Question[/msg])

Rounding should still be accurate enough. But check out the API you use to draw stuff - most languages do have float-Versions available aswell, which can have fractions.
BhaaL
Poster
Poster
 
Posts: 270
Joined: Sun Apr 13, 2008 11:16 am
Blog: View Blog (0)


Re: Programming 4 - A quick Question

Post by seth_slade on Thu Jun 19, 2008 11:08 am
([msg=5272]see Re: Programming 4 - A quick Question[/msg])

Thanks... I'll see if SDL supports float values.

And I'll bet even if SDL supports float values, they are still rounded before they are drawn. So.... I guess this whole thing has just been an exercise in futility. lol
seth_slade
New User
New User
 
Posts: 4
Joined: Wed May 28, 2008 5:34 pm
Blog: View Blog (0)


Re: Programming 4 - A quick Question

Post by sharpskater69 on Thu Jun 19, 2008 4:44 pm
([msg=5293]see Re: Programming 4 - A quick Question[/msg])

You don't need to round them, you draw the lines and arcs with those coordinates. They should turn out just fine.
sharpskater69
New User
New User
 
Posts: 34
Joined: Tue Apr 22, 2008 4:10 pm
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests