-3
I’m trying to figure out how to rotate a vector over a point (another vector) as a PIVOT tried on some websites that gave me the following code:
public Vector2 rotate_point(float cx,float cy,float angle,Vector2 p)
{
float s = (float) Math.sin(angle);
float c = (float) Math.cos(angle);
// translate point back to origin:
p.x-= cx;
p.y -= cy;
// rotate point
float xnew = p.x * c - p.y * s;
float ynew = p.x * s + p.y * c;
return p;
}
But I don’t understand what that variable would be Angle float.
PLEASE DO NOT USE HIGH BOX WITHOUT NEED. THANK YOU!!!!
– Guilherme Nascimento
It might be interesting to review the vector content before anything else. By the way, which programming language you want to analyze, Java or C++?
– Woss
SORRY I DON’T KNOW WHAT HIGH CASH
– dougllas
Anderson-carlos-woss am using java ,had stopped with programming a long time ago ,I decided to return only a simple doubt I will revive vectors ,but obg by responds
– dougllas
CAIXA-ALTA is the use of everything in upper case, just note that the Leticia already set https://answall.com/posts/206068/revisions, really using everything in upper case is totally unnecessary and more disturbing than helping ;)
– Guilherme Nascimento