From x y to 360

| Polar coordinate system?

| welcome to NHK

| >>1027608

Yep!

>>1027688

Instead x and y the Cartesian coordinates use polar angle phi = arctan(x/y), that changes in interval [0,2pi] in radians or in [0°,360°] of degrees, and radius r = sqrt(x^2 + y^2), of course.

| >>1027776 ...I dont feel like using these symbols. anything else i can use that is just x and y? like can i change phi to something else or arctan or ^2?

| trig math

| >>1027857

Yep, again!

>>1027785

Of course you can use your own variable names, I just used traditional ones, like Greek character called phi for angular variable. The sign ^ means get power of the thing before sign in value that after sign. For example x^y means the power of x with exponent y. Some languages used ** (double *, the asterisk sign) as sign of exponent similar to the sign ^.

| >>1027785 to continue>>1027896

The r is radius-vector, sqrt is "square root" and that formula just is the length of vector like the one in Euclidean space.

And the arctan is arctangent.

All formulas are ones that to transfer from Cartesian coordinates to polar ones.

But you can directly work with polar coordinates at very beginning. All are depend on your considered problem and your goal, what the result you want obtain.

| >>1027785 to continue>>1027897

And, finally, you can name angular variable as x, and radius vector as y. But I do not recommend it, cos it may make confused one who will read your code.

| >>1027896 >>1027897 >>1027898 no as in i need alternative method to produce sprite index from 1 to 12 back to 1 and then 12, all in clockwise or counter clockwise as according. basically like angles or radians etc but i want it "sustained" with only + - / and not even multiplications. walking around the xy coordinates or use events but no fancy maths

>https://vlix.io/video/290fa60eb31b5fc917ad/

| like how these sprite rotate only in one single direction, from facing up to right to facing down and then no left side so you have to flip... so i need something else for billboarding >>1028005

| >>1028059

*missclick* let me try again.

>but i want it "sustained" with only + - / and not even multiplications.

Oh, I think you should use (work) with quaternions (on two-dimensional space) instead vectors (i.e. the x and y coordinates). Like Unity and some other engines that are use quaternions to represent "rotation".

| >>1028111

I am not work with it now (in Unity in past) , even with programming the graphic. Not remember it, and that's not simple to explain it here.

You should look how it realized in your libraries, and more learn on hypercomplex numbers.

| >>1028182 well i just need to rotate this sprite but it does not look correct apparently https://vlix.io/video/6ab36c2904d3ba857305/

| Op I say this with love in my heart but you should consider using a different game engine.

| >>1028389 it's som uch fun tho. i can click and shit. 1 point something megabyte. i even already made a whole spinning projection. you cant possibly offer me anything else at all at this point except a rotation solution but without using anything else but +-/ and no angles.

This thread is closed.

| What can I use to turn x y position or direction to a number from 1 to 360 of sorts