



private static void WorldToRadar(Vector3 point, out Vector2 COUT)
{
float dx, dy, vr, vc, vs, px, py, d;
dx = point.x - mypos.x;
dy = point.y - mypos.y;
// now rotate it to see from our position
vr = (float)Radians(viewangles.y); // system.math uses radians
vc = (float)Math.Cos(vr);
vs = (float)Math.Sin(vr);
px = (dy * (0 - vc)) + ( dx * vs );
py = (dx * (0 - vc)) - ( dy * vs );
px /= 40; py /= 20; // scales nicely
//yr9 maths, go for it
d = (float)Math.Sqrt(Math.Pow((double)dx, 2) + (Math.Pow((double)dy, 2)));
if (d > radardistance) {
//return?
}
COUT = new Vector2(px, py);
}