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: 
I think the method you are looking for i Math.atan2 which computes the angle to an x and y cordinate. I have now modified the code to adjust for putting 0 degrees downwards. I have also flipped the y-axis to put 0, 0 cordinate in the upper left corner (screen coordinates), and adjusted degrees above 180 to be reported as negative degrees:

```
public double theta(int cx, int cy, int x, int y)
{
    double angle = Math.toDegrees(Math.atan2(cy - y, x - cx)) + 90;
    return angle <= 180? angle: angle - 360;
}

```

A small test to verify some angles...

```
@Test
public void test()
{
    assertThat(theta(50, 50, 60, 50), is(90.0));
    assertThat(theta(50, 50, 50, 60), is(0.0));
    assertThat(theta(50, 50, 40, 50), is(-90.0));
    assertThat(theta(50, 50, 50, 40), is(180.0));
}

```
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;

```