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

22 lines
823 B
Java

package com.bytezone.diskbrowser.visicalc;
// -----------------------------------------------------------------------------------//
class Sqrt extends ValueFunction
// -----------------------------------------------------------------------------------//
{
// ---------------------------------------------------------------------------------//
Sqrt (Cell cell, String text)
// ---------------------------------------------------------------------------------//
{
super (cell, text);
assert text.startsWith ("@SQRT(") : text;
}
// ---------------------------------------------------------------------------------//
@Override
public double calculateValue ()
// ---------------------------------------------------------------------------------//
{
return Math.sqrt (source.getDouble ());
}
}