Question: We have a strong regression automation suite developed with Watir for Web Apps and Calabash for IOS and Android and so far our executions are happening on Mac OS. 

We want to use RVM on Windows 10 so enabled bash feature on Windows 10 and installed RVM using Bash On Ubuntu On Windows. Using this installed RVM I would like to trigger the browsers installed on my Windows. I would like to know whether I am trying something that is possible ?

Just to check, I tried to trigger chrome browser in irb. 

**I placed my chrome driver below.**

[![enter image description here](https://i.stack.imgur.com/dEbEK.jpg)](https://i.stack.imgur.com/dEbEK.jpg)

**I have set my path and find the same below**

[![enter image description here](https://i.stack.imgur.com/CHhHL.jpg)](https://i.stack.imgur.com/CHhHL.jpg)

On triggering chrome browser in irb I am getting the below error even though the path is set correct.

```
Selenium::WebDriver::Error::WebDriverError:  Unable to find chromedriver. 

```

[![enter image description here](https://i.stack.imgur.com/XeRT0.jpg)](https://i.stack.imgur.com/XeRT0.jpg)

I would like to know whether trying to trigger the browser installed on my windows environment through the **Bash On Ubuntu On Windows** terminal is practically possible attempt or not ? If so, please let me know where the disconnect had happened in my setup.

Below are the versions I am installed with .

rvm 1.29.3 (latest)   

ruby-2.2.7   

watir (6.8.4)

Answer: 
You can find the tangent angles and add to 90 or substruct from 270 that angle and find the result, I believe. I design the code like your drawing. You can make it more generic, I guess. 
You have 4 area:

1. 0 degree to 90 degree
2. 90 degree to 180 degree
3. 90 degree to -90(270) degree
4. -90(270) degree to 0(360) degree

Code:

```
public static double findAngle(double x,  double y,
                               double cx, double cy, double radius){
    double beta, alfa;

    double distanceX = Math.abs(Math.abs(x) - Math.abs(cx));
    double distanceY = Math.abs(Math.abs(y) - Math.abs(cy));

    // check the point is on the circle or not
    // with euchlid
    if (radius != Math.sqrt(x * x + y * y)) {
        return -1;
    }

    if (x >= cx && y <= cy) {
        // find tangent
        beta = Math.atan(distanceY / distanceX);
        alfa = 90 - beta;
        return alfa;
    }
    // 90-180 -> second area
    else if (x >= cx && y >= cy) {
        beta = Math.atan(distanceY / distanceX);
        alfa = 90 + beta;
        return alfa;
    }
    // 180 - -90 -> third area
    else if (x <= cx && y >= cy) {
        beta = Math.atan(distanceY / distanceX);
        alfa = 270 - beta;
        return alfa;
    }
    // -90 - 0 -> forth area
    else if (x <= cx && y <= cy) {
        beta = Math.atan(distanceY / distanceX);
        alfa = 270 + beta;
        if (alfa == 360) {
            alfa = 0;
        }
        return alfa;    
    } 
    else {
        return -1;
    }
}

```
The main catch with `Atan2` is the center point. If your center is offset `(Cx, Cy)` and not at the origin and you want to find the arc angle between `(X1, Y1)` and `(X2, Y2)` then I would suggest this approach: 

```
double startAngle = Math.Atan2(Y1-Cy, X1-Cx);
double endAngle = Math.Atan2(Y2-Cy, X2-Cx);
double ArcAngle = endangle - startAngle;

```