My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* fnPad: a functional programming style calculator
* Copyright © 2001-2010 Hank Dolben, org.dolben.fn.Pad.LICENSE
*/
package fnx;

/**
* a fnPad cosine Function
*/
public class cos extends org.dolben.fn.Function {

/**
* makes an object that calculates the cosine of its argument
*/
public cos( ) {
super(1);
}

/**
* calculates the cosine of the zeroth argument
*
* @return cosine
*
* @throws Exception when argument is not a Number
*/
protected Object evaluate( ) throws Exception {
return new Double(Math.cos(getDouble(0)));
}

}

Change log

r17 by hdolben on Mar 14, 2010   Diff
use copyright symbol
Go to: 
Project members, sign in to write a code review

Older revisions

r12 by hdolben on Jan 9, 2010   Diff
merged branches/hank-01
r10 by hdolben on Jan 9, 2010   Diff
merged branches/hank-01
r8 by hdolben on Jan 9, 2010   Diff
merged branches/hank-01
All revisions of this file

File info

Size: 637 bytes, 30 lines
Powered by Google Project Hosting