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 );
585 static int round(
float value );
604 static long long round(
double value );
643 static double random();
700 static float signum(
float value );
714 static double signum(
double value );
722 return angdeg / 180 * PI;
731 return angrad * 180 / PI;
Math()
Definition: Math.h:43
static long long abs(long long value)
Returns the absolute value of an long long value.
Definition: Math.h:66
static int max(int a, int b)
Returns the larger of two int values.
Definition: Math.h:439
virtual ~Math()
Definition: Math.h:44
static const double E
Definition: Math.h:38
The class Math contains methods for performing basic numeric operations such as the elementary expone...
Definition: Math.h:35
static double toDegrees(double angrad)
Returns the measure in degrees of the supplied radian angle.
Definition: Math.h:730
static short max(short a, short b)
Returns the larger of two short values.
Definition: Math.h:426
static double toRadians(double angdeg)
Returns the measure in radians of the supplied degree angle.
Definition: Math.h:721
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 const double PI
Definition: Math.h:39
#define DECAF_API
Definition: Config.h:29
static int min(int a, int b)
Returns the smaller of two int values.
Definition: Math.h:359
static unsigned int min(unsigned int a, unsigned int b)
Returns the smaller of two unsigned int values.
Definition: Math.h:372
static int abs(int value)
Returns the absolute value of an int value.
Definition: Math.h:55
static long long min(long long a, long long b)
Returns the smaller of two long long values.
Definition: Math.h:385
static long long max(long long a, long long b)
Returns the larger of two long long values.
Definition: Math.h:452
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25