Class ecalctoolkit

Description

Simple class which can be used to perform calculations

Located in /ecalctoolkit.h.php (line 27)


	
			
Variable Summary
string $app
int $error
float $m1
float $m2
float $m3
float $m4
float $m5
float $m6
float $m7
float $m8
string $ver
Method Summary
void __construct ()
float add (Array(float) $listvalue)
float cube (float $value)
float divide (Array(float) $listvalue)
float factorial (int $value)
float get_pi ()
float multiply (Array(float) $listvalue)
float power (float $val1, float $val2)
float replace_m (mixed $v)
bool set_memory (int $id, float $value)
float square (float $value)
float subtract (Array(float) $listvalue)
string toolkitinfo ([bool $complete = false])
string toolkitversion ()
Variables
string $app (line 63)
int $error (line 76)

Error codes:

0 - no error 1 - invalid value 2 - invalid list value 3 - invalid memory id (1-8)

float $m1 (line 31)
float $m2 (line 35)
float $m3 (line 39)
float $m4 (line 43)
float $m5 (line 47)
float $m6 (line 51)
float $m7 (line 55)
float $m8 (line 59)
string $ver (line 67)
Methods
Constructor __construct (line 86)

Constructor

Initializes the memory values to their default value.

  • function: __construct
void __construct ()
add (line 204)

Adds two or more values together

  • return: Resulting value
  • function: add
float add (Array(float) $listvalue)
  • Array(float) $listvalue
cube (line 295)

Compute the cube of a value

  • return: Resulting value
  • function: cube
float cube (float $value)
  • float $value
divide (line 255)

Divides two or more numbers in order

  • return: Resulting value
  • function: divide
float divide (Array(float) $listvalue)
  • Array(float) $listvalue
factorial (line 305)

Calculates the factorial of an value

  • return: Resulting value
  • function: factorial
float factorial (int $value)
  • int $value: The value
get_error_code (line 185)

Returns the current error code

  • return: Current error code
  • function: get_error_code
int get_error_code ()
get_pi (line 320)

Returns the value of Pi

  • return: The value of Pi
  • function: get_pi
float get_pi ()
multiply (line 237)

Multiplies two or more values together

  • return: Resulting value
  • function: multiply
float multiply (Array(float) $listvalue)
  • Array(float) $listvalue
power (line 275)

Compute the power of two values

  • return: Resulting value
  • function: power
float power (float $val1, float $val2)
  • float $val1: The first value
  • float $val2: The second value
replace_m (line 134)

Replaces memory references with their real values

  • return: The resulting value
  • function: replace_m
float replace_m (mixed $v)
  • mixed $v: The input
reset_error_code (line 194)

Resets the current error code

  • function: reset_error_code
void reset_error_code ()
set_memory (line 170)

Sets a memory key's value

  • return: Returns false on error, true on success
  • function: set_memory
bool set_memory (int $id, float $value)
  • int $id: The Key ID
  • float $value: The value to set
square (line 285)

Compute the square of a value

  • return: Resulting value
  • function: square
float square (float $value)
  • float $value
subtract (line 218)

Subtracts two or more values

  • return: Resulting value
  • function: subtract
float subtract (Array(float) $listvalue)
  • Array(float) $listvalue
toolkitinfo (line 110)

Gets information for this toolkit

  • return: Information
  • function: toolkitinfo
string toolkitinfo ([bool $complete = false])
  • bool $complete: If true, returns whole string instead of app only
toolkitversion (line 124)

Gets this toolkit's version

  • return: Toolkit version
  • function: toolkitversion
string toolkitversion ()

Documentation generated on Fri, 28 Nov 2008 21:57:45 -0500 by phpDocumentor 1.4.1