Tabnine Logo
Math.cbrt
Code IndexAdd Tabnine to your IDE (free)

How to use
cbrt
method
in
java.lang.Math

Best Java code snippets using java.lang.Math.cbrt (Showing top 20 results out of 972)

origin: libgdx/libgdx

  public float apply (float a) {
    return 1 - (float)Math.cbrt(-(a - 1));
  }
};
origin: libgdx/libgdx

  public float apply (float a) {
    return 1 - (float)Math.cbrt(-(a - 1));
  }
};
origin: libgdx/libgdx

  public float apply (float a) {
    return (float)Math.cbrt(a);
  }
};
origin: libgdx/libgdx

  public float apply (float a) {
    return (float)Math.cbrt(a);
  }
};
origin: libgdx/libgdx

/** Calls {@link #ellipse(float, float, float, float, int)} by estimating the number of segments needed for a smooth ellipse. */
public void ellipse (float x, float y, float width, float height) {
  ellipse(x, y, width, height, Math.max(1, (int)(12 * (float)Math.cbrt(Math.max(width * 0.5f, height * 0.5f)))));
}
origin: libgdx/libgdx

/** Calls {@link #arc(float, float, float, float, float, int)} by estimating the number of segments needed for a smooth arc. */
public void arc (float x, float y, float radius, float start, float degrees) {
  arc(x, y, radius, start, degrees, Math.max(1, (int)(6 * (float)Math.cbrt(radius) * (degrees / 360.0f))));
}
origin: libgdx/libgdx

/** Calls {@link #circle(float, float, float, int)} by estimating the number of segments needed for a smooth circle. */
public void circle (float x, float y, float radius) {
  circle(x, y, radius, Math.max(1, (int)(6 * (float)Math.cbrt(radius))));
}
origin: libgdx/libgdx

/** Calls {@link #ellipse(float, float, float, float, float, int)} by estimating the number of segments needed for a smooth ellipse. */
public void ellipse (float x, float y, float width, float height, float rotation) {
  ellipse(x, y, width, height, rotation, Math.max(1, (int)(12 * (float)Math.cbrt(Math.max(width * 0.5f, height * 0.5f)))));
}
origin: libgdx/libgdx

/** Calls {@link #circle(float, float, float, int)} by estimating the number of segments needed for a smooth circle. */
public void circle (float x, float y, float radius) {
  circle(x, y, radius, Math.max(1, (int)(6 * (float)Math.cbrt(radius))));
}
origin: libgdx/libgdx

/** Calls {@link #ellipse(float, float, float, float, int)} by estimating the number of segments needed for a smooth ellipse. */
public void ellipse (float x, float y, float width, float height) {
  ellipse(x, y, width, height, Math.max(1, (int)(12 * (float)Math.cbrt(Math.max(width * 0.5f, height * 0.5f)))));
}
origin: libgdx/libgdx

/** Calls {@link #arc(float, float, float, float, float, int)} by estimating the number of segments needed for a smooth arc. */
public void arc (float x, float y, float radius, float start, float degrees) {
  arc(x, y, radius, start, degrees, Math.max(1, (int)(6 * (float)Math.cbrt(radius) * (degrees / 360.0f))));
}
origin: libgdx/libgdx

/** Calls {@link #ellipse(float, float, float, float, float, int)} by estimating the number of segments needed for a smooth ellipse. */
public void ellipse (float x, float y, float width, float height, float rotation) {
  ellipse(x, y, width, height, rotation, Math.max(1, (int)(12 * (float)Math.cbrt(Math.max(width * 0.5f, height * 0.5f)))));
}
origin: org.springframework.boot/spring-boot

private double f(double t) {
  return (t > (216.0 / 24389.0)) ? Math.cbrt(t)
      : (1.0 / 3.0) * Math.pow(29.0 / 6.0, 2) * t + (4.0 / 29.0);
}
origin: apache/incubator-druid

 @Override
 protected ExprEval eval(double param)
 {
  return ExprEval.of(Math.cbrt(param));
 }
}
origin: EngineHub/WorldEdit

public static double cbrt(RValue x) throws EvaluationException {
  return Math.cbrt(x.getValue());
}
origin: apache/hive

@Override
public Object evaluate(DeferredObject[] arguments) throws HiveException {
 Double val = getDoubleValue(arguments, 0, converters);
 if (val == null) {
  return null;
 }
 double cbrt = Math.cbrt(val);
 output.set(cbrt);
 return output;
}
origin: apache/drill

@Override
public Object evaluate(DeferredObject[] arguments) throws HiveException {
 Double val = getDoubleValue(arguments, 0, converters);
 if (val == null) {
  return null;
 }
 double cbrt = Math.cbrt(val);
 output.set(cbrt);
 return output;
}
origin: prestodb/presto

@Test
public void testCbrt()
{
  for (double doubleValue : DOUBLE_VALUES) {
    assertFunction("cbrt(" + doubleValue + ")", DOUBLE, Math.cbrt(doubleValue));
    assertFunction("cbrt(REAL '" + (float) doubleValue + "')", DOUBLE, Math.cbrt((float) doubleValue));
  }
  assertFunction("cbrt(NULL)", DOUBLE, null);
}
origin: prestodb/presto

@Description("cube root")
@ScalarFunction
@SqlType(StandardTypes.DOUBLE)
public static double cbrt(@SqlType(StandardTypes.DOUBLE) double num)
{
  return Math.cbrt(num);
}
origin: jtablesaw/tablesaw

default DoubleColumn cubeRoot() {
  DoubleColumn newColumn = DoubleColumn.create(name() + "[cbrt]", size());
  for (int i = 0; i < size(); i++) {
    newColumn.set(i, Math.cbrt(getDouble(i)));
  }
  return newColumn;
}
java.langMathcbrt

Javadoc

Returns the closest double approximation of the cube root of the argument.

Special cases:

  • cbrt(+0.0) = +0.0
  • cbrt(-0.0) = -0.0
  • cbrt(+infinity) = +infinity
  • cbrt(-infinity) = -infinity
  • cbrt(NaN) = NaN

Popular methods of Math

  • min
    Returns the smaller of two long values. That is, the result is the argument closer to the value of L
  • max
    Returns the greater of two long values. That is, the result is the argument closer to the value of L
  • abs
    Returns the absolute value of a long value. If the argument is not negative, the argument is returne
  • round
    Returns the closest int to the argument, with ties rounding up. Special cases: * If the argument is
  • pow
    Returns the value of the first argument raised to the power of the second argument. Special cases: *
  • sqrt
    Returns the correctly rounded positive square root of a double value. Special cases: * If the argume
  • ceil
    Returns the smallest (closest to negative infinity) double value that is greater than or equal to th
  • floor
    Returns the largest (closest to positive infinity) double value that is less than or equal to the ar
  • random
    Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. Returne
  • sin
    Returns the trigonometric sine of an angle. Special cases: * If the argument is NaN or an infinit
  • cos
    Returns the trigonometric cosine of an angle. Special cases: * If the argument is NaN or an infin
  • log
    Returns the natural logarithm (base e) of a doublevalue. Special cases: * If the argument is NaN
  • cos,
  • log,
  • exp,
  • toRadians,
  • atan2,
  • log10,
  • acos,
  • tan,
  • toDegrees,
  • atan

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now