MikroElektronika / mikrosdk_v2

mikroSDK 2.0 is an embedded software development framework designed to simplify and accelerate application development on Mikroe hardware platform, specifically for Click Boards™ and other extension board drivers, on a wide range of microcontroller vendors and architectures.
https://www.mikroe.com/mikrosdk
Other
63 stars 38 forks source link

Added GL ellipse drawing function and its test code #5

Closed NH002 closed 1 year ago

NH002 commented 1 year ago

I added a complete GL ellipse drawing function, along with its testing code. I wrote all this code as part of a job-hiring test and am expecting feedback from my mentor. If this pull request is accepted (after potential feedback-inspired modifications) please add me to the list of contributors.

StrahinjaJacimovic commented 1 year ago

@NH002 , after additional testing, I came across the following situation.

Passing following arguments for a 4 inch display results in the ellipse being distorted:

image

Please look into it. I assume there is an error in the algorithm somewhere.

NH002 commented 1 year ago

@NH002 , after additional testing, I came across the following situation.

Passing following arguments for a 4 inch display results in the ellipse being distorted:

* `half_a = 580`

* `half_b = 200`

image

Please look into it. I assume there is an error in the algorithm somewhere.

Those were just overflow issues; fixed by appropriate casts.