Buildings.GetRotation C# (CSharp) Method

GetRotation() private method

get 360 rotation of vector
private GetRotation ( Vector3 segDir ) : float
segDir Vector3
return float
    private float GetRotation(Vector3 segDir)
    {
        float a1 = Mathf.Atan2 (segDir.x, segDir.y) * Mathf.Rad2Deg;
        a1 += a1 < 0 ? 360 : 0;

        return a1;
    }