dmolony-DiskBrowser/src/com/bytezone/diskbrowser/visicalc/Abs.java

22 lines
819 B
Java
Raw Normal View History

2016-03-15 04:40:57 +00:00
package com.bytezone.diskbrowser.visicalc;
2020-02-10 11:05:40 +00:00
// -----------------------------------------------------------------------------------//
2017-03-19 23:21:10 +00:00
public class Abs extends ValueFunction
2020-02-10 11:05:40 +00:00
// -----------------------------------------------------------------------------------//
2016-03-15 04:40:57 +00:00
{
2020-02-10 11:05:40 +00:00
// ---------------------------------------------------------------------------------//
Abs (Cell cell, String text)
2020-02-10 11:05:40 +00:00
// ---------------------------------------------------------------------------------//
2016-03-15 04:40:57 +00:00
{
super (cell, text);
2017-03-18 09:21:11 +00:00
assert text.startsWith ("@ABS(") : text;
2016-03-15 04:40:57 +00:00
}
2020-02-10 11:05:40 +00:00
// ---------------------------------------------------------------------------------//
2016-03-15 20:06:04 +00:00
@Override
2017-03-20 01:45:14 +00:00
double calculateValue ()
2020-02-10 11:05:40 +00:00
// ---------------------------------------------------------------------------------//
2016-03-15 04:40:57 +00:00
{
2017-03-23 13:30:41 +00:00
return Math.abs (source.getDouble ());
2016-03-15 04:40:57 +00:00
}
}