Introduction
Here is the source code for Main.java
Source
//package com.java2s;
public class Main {
public static double getXMoveDistance(double slope, double dis) {
if (slope == Double.MAX_VALUE) {
return dis;
}
return Math.abs((dis * slope) / Math.sqrt(1 + slope * slope));
}
}