alexhelder
10/16/2023, 6:36 PMromainguy
10/16/2023, 6:44 PMPath
alexhelder
10/16/2023, 6:57 PMromainguy
10/16/2023, 7:06 PMatan2
and from that angle you can find the corresponding sliceconst val RadToDeg = (180.0 / PI).toFloat()
val angleInRad = atan2(y, x)
val angleInDeg = angleInRad * RadToDeg
angleRad
will be in the -PI..PI
range so you might want to account for thatx
and y
are offsets from the center of the pizza)alexhelder
10/16/2023, 7:36 PMromainguy
10/16/2023, 7:43 PMalexhelder
10/16/2023, 8:20 PMromainguy
10/16/2023, 8:24 PMalexhelder
10/16/2023, 8:37 PMromainguy
10/17/2023, 3:59 PM