Mathworks++
A C++ port of Python Mathworks
 All Classes Namespaces Files Functions Pages
mathworks::exponent Namespace Reference

Functions

int square (int base)
 Gets the square of the number. More...
 
double square (double base)
 Gets the square of the number. More...
 
int cube (int base)
 Gets the cube of the number. More...
 
double cube (double base)
 Gets the cube of the number. More...
 
int calc (int base, int power)
 Raises a number to a power. More...
 
double calc (double base, int power)
 Raises a number to a power. More...
 

Function Documentation

int mathworks::exponent::calc ( int  base,
int  power 
)

Raises a number to a power.

Parameters
baseThe base.
powerThe power to raise "base" to.
Returns
The result of the calculation.
double mathworks::exponent::calc ( double  base,
int  power 
)

Raises a number to a power.

Parameters
baseThe base.
powerThe power to raise "base" to.
Returns
The result of the calculation.
int mathworks::exponent::cube ( int  base)

Gets the cube of the number.

Parameters
baseThe base to cube.
Returns
The cube of the numbers.
double mathworks::exponent::cube ( double  base)

Gets the cube of the number.

Parameters
baseThe base to cube.
Returns
The cube of the numbers.
int mathworks::exponent::square ( int  base)

Gets the square of the number.

Parameters
baseThe base to square.
Returns
The square of the numbers.
double mathworks::exponent::square ( double  base)

Gets the square of the number.

Parameters
baseThe base to square.
Returns
The square of the numbers.