mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-26 17:29:50 +00:00
27 lines
487 B
Java
27 lines
487 B
Java
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 ());
|
|
}
|
|
} |