/* * @(#)Hypotenuse.java * * Summary: Calculate hypotenuse of a triangle. * * Copyright: (c) 2009 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.6+ * * Created with: IntelliJ IDEA IDE. * * 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 INSTANCE METHODS -------------------------- public double calc( double a, double b ) { return Math.sqrt( a * a + b * b ); } public Date whenCompiled() { return new Date( 1139064560703L ); } }