UnityEditor.GizmoInfo.Update C# (CSharp) Method

Update() public method

public Update ( Vector2 point1, Vector2 point2 ) : void
point1 Vector2
point2 Vector2
return void
        public void Update(Vector2 point1, Vector2 point2)
        {
            this.m_Point1 = point1;
            this.m_Point2 = point2;
            this.m_Center = (Vector2) ((point1 + point2) * 0.5f);
            Vector2 vector = point2 - point1;
            this.m_Length = vector.magnitude * 0.5f;
            Vector3 rhs = (Vector3) this.Get2DPlane(this.m_Center, 0f);
            float num = Vector3.Dot(new Vector3(point1.x, point1.y, 1f), rhs);
            Vector2 vector3 = point1 - point2;
            this.m_Angle = 0.01745329f * Vector2.Angle(new Vector2(0f, 1f), vector3.normalized);
            if (num > 0f)
            {
                this.m_Angle = 6.283185f - this.m_Angle;
            }
            this.m_Plane = this.Get2DPlane(this.m_Center, this.m_Angle);
            this.m_PlaneOrtho = this.Get2DPlane(this.m_Center, this.m_Angle + 1.570796f);
        }

Same methods

GizmoInfo::Update ( Vector2 center, float length, float angle ) : void