public class MathExamples {
	public static void main(String[] args) {
		double result1 = Math.sqrt(16);
		System.out.println(result1);
		System.out.println(Math.sin(Math.PI));
		
		double complexResult = 3 * Math.pow(Math.round(2.7), 3);
		System.out.println(complexResult);
		
		int age = -10;
		System.out.println(Math.max(age, 0));
		
		//System.out.println("The slope between (5, 10) and (15, 20) is: " + slope(5, 10, 15, 20));
		double result = slope(5, 10, 15, 20);
		System.out.println(result);
		
		int sum = sum(5, 10);
		System.out.println(sum);
		
		System.out.println(sum10(25));
	}
	
	// Returns the slope of the line between the given points.
	public static double slope(int x1, int y1, int x2, int y2) {
	    double dy = y2 - y1;
	    double dx = x2 - x1;
	    double result = dy / dx;
		 return result;
	}
	
	public static int sum(int a, int b) {
		return a + b;
	}
	
	public static double sum10(double a) {
		return a + 10;
	}
}
