Codota Logo
OWLRealUtils.roundFloor
Code IndexAdd Codota to your IDE (free)

How to use
roundFloor
method
in
openllet.core.datatypes.OWLRealUtils

Best Java code snippets using openllet.core.datatypes.OWLRealUtils.roundFloor (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: Galigator/openllet

public static Number roundFloor(final Number n)
{
  final Type t = Type.get(n.getClass());
  if (t == null)
  {
    final String msg = format("Unexpected number type %s passed to roundDown method.", n.getClass().getCanonicalName());
    _logger.warning(msg);
    throw new IllegalArgumentException(msg);
  }
  if (t.isIntegerOnly())
    return n;
  if (Type.BIG_DECIMAL.equals(t))
  {
    final BigDecimal d = (BigDecimal) n;
    final BigDecimal[] dandr = d.divideAndRemainder(BigDecimal.ONE);
    if (dandr[1].equals(BigDecimal.ZERO) || d.signum() == 1)
      return shrinkBigInteger(dandr[0].toBigIntegerExact());
    else
      return shrinkBigInteger(dandr[0].toBigIntegerExact().subtract(BigInteger.ONE));
  }
  else
    if (Type.RATIONAL.equals(t))
    {
      final Rational r = (Rational) n;
      return roundFloor(r.getQuotient());
    }
    else
      throw new IllegalStateException();
}
origin: Galigator/openllet

public static Number roundFloor(final Number n)
{
  final Type t = Type.get(n.getClass());
  if (t == null)
  {
    final String msg = format("Unexpected number type %s passed to roundDown method.", n.getClass().getCanonicalName());
    _logger.warning(msg);
    throw new IllegalArgumentException(msg);
  }
  if (t.isIntegerOnly())
    return n;
  if (Type.BIG_DECIMAL.equals(t))
  {
    final BigDecimal d = (BigDecimal) n;
    final BigDecimal[] dandr = d.divideAndRemainder(BigDecimal.ONE);
    if (dandr[1].equals(BigDecimal.ZERO) || d.signum() == 1)
      return shrinkBigInteger(dandr[0].toBigIntegerExact());
    else
      return shrinkBigInteger(dandr[0].toBigIntegerExact().subtract(BigInteger.ONE));
  }
  else
    if (Type.RATIONAL.equals(t))
    {
      final Rational r = (Rational) n;
      return roundFloor(r.getQuotient());
    }
    else
      throw new IllegalStateException();
}
origin: Galigator/openllet

upper = OWLRealUtils.roundFloor(cu);
origin: Galigator/openllet

upper = OWLRealUtils.roundFloor(cu);
openllet.core.datatypesOWLRealUtilsroundFloor

Popular methods of OWLRealUtils

  • compare
  • getCanonicalObject
  • isInteger
  • acceptable
  • bigDecimal
  • bigInteger
  • convertFromTo
  • integerDecrement
  • integerDifference
  • integerIncrement
  • integerSum
  • isDecimal
  • integerSum,
  • isDecimal,
  • isRational,
  • print,
  • roundCeiling,
  • roundDown,
  • shrinkBigInteger,
  • signum,
  • sum

Popular in Java

  • Making http post requests using okhttp
  • putExtra (Intent)
  • getSystemService (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now