-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
293 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Acos extends Function | ||
{ | ||
Value v; | ||
|
||
Acos (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.acos (v.getValue ()); | ||
|
||
if (Double.isNaN (value)) | ||
valueType = ValueType.ERROR; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Asin extends Function | ||
{ | ||
Value v; | ||
|
||
Asin (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.asin (v.getValue ()); | ||
|
||
if (Double.isNaN (value)) | ||
valueType = ValueType.ERROR; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Atan extends Function | ||
{ | ||
Value v; | ||
|
||
Atan (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.atan (v.getValue ()); | ||
|
||
if (Double.isNaN (value)) | ||
valueType = ValueType.ERROR; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Cos extends Function | ||
{ | ||
Value v; | ||
|
||
Cos (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.cos (v.getValue ()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Exp extends Function | ||
{ | ||
Value v; | ||
|
||
Exp (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.exp (v.getValue ()); | ||
|
||
if (Double.isNaN (value)) | ||
valueType = ValueType.ERROR; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Ln extends Function | ||
{ | ||
Value v; | ||
|
||
Ln (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.log (v.getValue ()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Log10 extends Function | ||
{ | ||
Value v; | ||
|
||
Log10 (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.log10 (v.getValue ()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Sin extends Function | ||
{ | ||
Value v; | ||
|
||
Sin (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.sin (v.getValue ()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.bytezone.diskbrowser.visicalc; | ||
|
||
public class Tan extends Function | ||
{ | ||
Value v; | ||
|
||
Tan (Sheet parent, Cell cell, String text) | ||
{ | ||
super (parent, cell, text); | ||
|
||
v = new Expression (parent, cell, functionText).reduce (); | ||
valueType = ValueType.VALUE; | ||
} | ||
|
||
@Override | ||
public void calculate () | ||
{ | ||
v.calculate (); | ||
if (!v.isValueType (ValueType.VALUE)) | ||
{ | ||
valueType = v.getValueType (); | ||
return; | ||
} | ||
|
||
value = Math.tan (v.getValue ()); | ||
} | ||
} |