18#ifndef _DECAF_LANG_MATH_H_
19#define _DECAF_LANG_MATH_H_
38 static const double E;
39 static const double PI;
55 static int abs(
int value ) {
56 return value < 0 ? -value : value;
66 static long long abs(
long long value ) {
67 return value < 0 ? -value : value;
86 static float abs(
float value );
105 static double abs(
double value );
301 static double sqrt(
double value );
319 static double pow(
double base,
double exp );
346 static short min(
short a,
short b ) {
347 return ( a <= b ? a : b );
359 static int min(
int a,
int b ) {
360 return ( a <= b ? a : b );
372 static unsigned int min(
unsigned int a,
unsigned int b ) {
373 return ( a <= b ? a : b );
385 static long long min(
long long a,
long long b ) {
386 return ( a <= b ? a : b );
401 static float min(
float a,
float b );
415 static double min(
double a,
double b );
426 static short max(
short a,
short b ) {
427 return ( a >= b ? a : b );
439 static int max(
int a,
int b ) {
440 return ( a >= b ? a : b );
452 static long long max(
long long a,
long long b ) {
453 return ( a >= b ? a : b );
468 static float max(
float a,
float b );
481 static double max(
double a,
double b );
549 static double ceil(
double value );
566 static double floor(
double value );
604 static long long round(
double value );
722 return angdeg / 180 *
PI;
731 return angrad * 180 /
PI;
static double pow(double base, double exp)
Returns the value of the first argument raised to the power of the second argument.
static double random()
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
static double max(double a, double b)
Returns the greater of two double values.
static short max(short a, short b)
Returns the larger of two short values.
Definition Math.h:426
static long long abs(long long value)
Returns the absolute value of an long long value.
Definition Math.h:66
static int min(int a, int b)
Returns the smaller of two int values.
Definition Math.h:359
Math()
Definition Math.h:43
static double sqrt(double value)
Returns the arc cosine of an angle, in the range of 0.0 through pi.
static float max(float a, float b)
Returns the greater of two float values.
static int abs(int value)
Returns the absolute value of an int value.
Definition Math.h:55
static short min(short a, short b)
Returns the double value that is closest in value to the argument and is equal to a mathematical inte...
Definition Math.h:346
static long long min(long long a, long long b)
Returns the smaller of two long long values.
Definition Math.h:385
static double floor(double value)
Returns the largest (closest to positive infinity) double value that is less than or equal to the arg...
static const double E
Definition Math.h:38
static double ceil(double value)
Returns the natural logarithm (base e) of a double value.
static float min(float a, float b)
Returns the smaller of two float values.
static float signum(float value)
Returns Euler's number e raised to the power of a double value.
static int round(float value)
Returns the closest int to the argument.
static long long max(long long a, long long b)
Returns the larger of two long long values.
Definition Math.h:452
virtual ~Math()
Definition Math.h:44
static long long round(double value)
Returns the closest long long to the argument.
static double toRadians(double angdeg)
Returns the measure in radians of the supplied degree angle.
Definition Math.h:721
static const double PI
Definition Math.h:39
static double toDegrees(double angrad)
Returns the measure in degrees of the supplied radian angle.
Definition Math.h:730
static float abs(float value)
Returns the absolute value of a float value.
static unsigned int min(unsigned int a, unsigned int b)
Returns the smaller of two unsigned int values.
Definition Math.h:372
static double signum(double value)
Returns the signum function of the argument; zero if the argument is zero, 1.0f if the argument is gr...
static double abs(double value)
Returns the absolute value of a double value.
static double min(double a, double b)
Returns the smaller of two double values.
static int max(int a, int b)
Returns the larger of two int values.
Definition Math.h:439
#define DECAF_API
Definition Config.h:29
Definition ThreadingTypes.h:31
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25