Here you can find the source of sqrt2sq(double x, double y)
public static double sqrt2sq(double x, double y)
//package com.java2s; //License from project: Open Source License public class Main { public static double sqrt2sq(double x, double y) { return sqrt(sq(x) + sq(y)); }/* w w w .j ava2 s . c om*/ public static double sqrt(double d) { if (d == 0D) return 0D; else if (d == 1D) return 1D; else return Math.sqrt(d); } public static double sq(double f) { return f * f; } public static double sq(double f, int i) { if (i == 2) return sq(f); double f1 = 1D; for (int j = 0; j < i; j++) f1 *= f; return f1; } }