Formula to calculate pythagorean Theorem - Android java.lang

Android examples for java.lang:Math Formula

Description

Formula to calculate pythagorean Theorem

Demo Code


//package com.java2s;

public class Main {
    private static double result;

    public static double pythagoreanTheorem(double a, double b) {
        result = (Math.sqrt(a * a + b * b));
        return result;
    }/*from  ww w  .  j av  a2s . c om*/
}

Related Tutorials