private float collisionParallel(float[] distances, float goalBearing) {
        boolean parallelCollision = false;
        float w1x = 0;
        float w1y = 0;
        float w2x = 0;
        float w2y = 0;
        
        float theta = 45.0f;
        for (int i = 0; i < distances.length; ++i, theta -= 15.0f) {
            if (distances[i] == 60.0f) {
                continue;
            }
            w1x = (float) (distances[i]*Math.cos(Math.toRadians(theta)));
            w1y = (float) (distances[i]*Math.sin(Math.toRadians(theta)));
            break;
        }
        
        theta = -45.0f;
        for (int i = distances.length-1; i >= 0; --i, theta += 15.0f) {
            if (distances[i] == 60.0f) {
                continue;
            }
            w2x = (float) (distances[i]*Math.cos(Math.toRadians(theta)));
            w2y = (float) (distances[i]*Math.sin(Math.toRadians(theta)));
            break;
        }
        
        
        float px = (float) (20.0*Math.cos(Math.toRadians(goalBearing)));
        float py = (float) (20.0*Math.sin(Math.toRadians(goalBearing)));
        
        float intPoint[] = Intersection.intersectionPoint(w1x, w1y, w2x, w2y, 0, 0, px, py);
        
        if (intPoint == null) {
            return 0;
        } else {
            float a2 = w1x*w1x + w1y*w1y;
            float b2 = intPoint[0]*intPoint[0] + intPoint[1]*intPoint[1];
            float c2 = (w1x-intPoint[0])*(w1x-intPoint[0]) + (w1y-intPoint[1])*(w1y-intPoint[1]);
            
            float top = b2 + c2 - a2;
            float bottom = (float) (2.0 * Math.sqrt(b2) * Math.sqrt(c2));
            
            float frac = top / bottom;
            float angle = (float) Math.toDegrees(Math.acos(frac));
            
            return angle;
        }
    }