Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

Math problem with circular image (radians, not evenly spaced?)

$
0
0

Hi!

I have a function (see below) where float2 is a simple class holding a x and y float. I use the function to draw a circular image:

This is drawn with the variable “progress” at value 0.1 (the dark part is 10 % of a full lap). The problem is that something is off, if i evenly increase “progress” the filling of the image is faster in cardinal directions (north, east etc) and slower in the “corners” (northeast etc). The image is a square so it seems the code below goes around the other border of that square or …


Viewing all articles
Browse latest Browse all 16874

Trending Articles