Draw half circle Line renderer

Hey there I have this script:

using UnityEngine;
using System.Collections;

public class AttackPlayerLaser : WeaponStats
{
    public int segments;
    public float xradius;
    public float yradius;
    LineRenderer line;

    protected override void Start()
    {
        base.Start();

        line = gameObject.GetComponent<LineRenderer>();
        line.SetVertexCount(segments + 1);
        line.useWorldSpace = false;
    }

    //function for firing the laser
    public void Fire(PlayerControls pc)
    {
        float x = 0f;
        float y = 0f;
        float z;
        float angle = 20f;

        for (int i = 0; i < (segments + 1); i++)
        {
            x = Mathf.Sin(Mathf.Deg2Rad * angle) * xradius;
            z = Mathf.Cos(Mathf.Deg2Rad * angle) * yradius;

            line.SetPosition(i, new Vector3(x, y, z));

            angle += (360f / segments);
        }
    }
}

This script allows me to draw a line in a full circle using the line renderer.
What I didn’t manage to achieve yet us to tell the line renderer only to draw like half a circle or just 90 degrees etc.

Can anyone help me out with this ?

What happens when you change 360 to 180? I didn’t read the rest of the code. But that 360 has got to be 360 as in “360 degrees in a full circle.” So 180 is half. Seems like that should do something.