/* * [Hypotenuse.java] * * Summary: Calculate hypotenuse of a triangle. * * Copyright: (c) 2009-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2009-01-01 */ package com.mindprod.example; import java.util.Date; /** * Calculate hypotenuse of a triangle. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2009-01-01 * @since 2009-01-01 */ public class Hypotenuse implements Calculator { public double calc( double a, double b ) { return Math.sqrt( a * a + b * b ); } public Date whenCompiled() { return new Date( 1139064560703L ); } }