private Vector4 Get2DPlane(Vector2 firstPoint, float angle)
{
Vector4 vector = new Vector4();
angle = angle % 6.283185f;
Vector2 vector2 = new Vector2(firstPoint.x + Mathf.Sin(angle), firstPoint.y + Mathf.Cos(angle));
Vector2 vector3 = vector2 - firstPoint;
if (Mathf.Abs(vector3.x) < 1E-05)
{
vector.Set(-1f, 0f, firstPoint.x, 0f);
float num = (Mathf.Cos(angle) <= 0f) ? -1f : 1f;
vector = (Vector4) (vector * num);
}
else
{
float num2 = vector3.y / vector3.x;
vector.Set(-num2, 1f, -(firstPoint.y - (num2 * firstPoint.x)), 0f);
}
if (angle > 3.141593f)
{
vector = -vector;
}
float num3 = Mathf.Sqrt((vector.x * vector.x) + (vector.y * vector.y));
return (Vector4) (vector / num3);
}