Best way to cast four rays at collider edge

Wondering if there is a better way to do the following:

Currently using the following code that is repeated for each side.

////forward hit
        if (Physics.Raycast(transform.position + Vector3.forward / 2f, Vector3.down, out fhit, rayLength))
        {
            Gizmos.color = Color.green;
            Gizmos.DrawRay(transform.position + Vector3.forward / 2f, Vector3.down * rayLength);

        }
        else
        {
            Gizmos.color = Color.red;
            Gizmos.DrawRay(transform.position + Vector3.forward / 2f, Vector3.down * rayLength);
        }

I’m wondering if there’s a better way? Maybe a for loop that sets the origin forward/2f then rotate 90 degrees, repeat 4 times… But I’m unsure how I’d rotate the ray in the for loop.

For anyone wondering, here’s how:

Quaternion q = Quaternion.AngleAxis(90f, Vector3.up);
        Vector3 dir = Vector3.forward;

        for (int i = 0; i < 4; i++)
        {
            Gizmos.color = Color.green;
            Gizmos.DrawRay(transform.position + (q * dir) / 2f, Vector3.down * rayLength);
            dir = q * dir;
        }