01: package eg;
02:
03: // Copyright (c) 2002 Cunningham & Cunningham, Inc.
04: // Released under the terms of the GNU General Public License version 2 or later.
05:
06: import fit.ColumnFixture;
07: import fit.ScientificDouble;
08:
09: public class ArithmeticColumnFixture extends ColumnFixture {
10:
11: public int x;
12: public int y;
13:
14: public int plus() {
15: return x + y;
16: }
17:
18: public int minus() {
19: return x - y;
20: }
21:
22: public int times() {
23: return x * y;
24: }
25:
26: public int divide() {
27: return x / y;
28: }
29:
30: public float floating() {
31: return (float) x / (float) y;
32: }
33:
34: public ScientificDouble sin() {
35: return new ScientificDouble(Math.sin(Math.toRadians(x)));
36: }
37:
38: public ScientificDouble cos() {
39: return new ScientificDouble(Math.cos(Math.toRadians(x)));
40: }
41:
42: }
|