A PHP representation of the CQL float datatype

Implements

Methods

__construct

( mixed $value )

Creates a new float.

Parameters:
Name Type Details
$value double|int|string|Dse\Float

A float value as a string, number or Dse\Float

string

__toString

( )

Returns string representation of the float value.

Returns:
Type Details
string

float value

Dse\Type

type

( )

The type of this float.

Returns:
Type Details
Dse\Type
float

value

( )

Returns the float value.

Returns:
Type Details
float

float value

bool

isInfinite

( )
Returns:
Type Details
bool
bool

isFinite

( )
Returns:
Type Details
bool
bool

isNaN

( )
Returns:
Type Details
bool
Dse\Numeric

add

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to add to this one

Returns:
Type Details
Dse\Numeric

sum

Dse\Numeric

sub

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to subtract from this one

Returns:
Type Details
Dse\Numeric

difference

Dse\Numeric

mul

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to multiply this one by

Returns:
Type Details
Dse\Numeric

product

Dse\Numeric

div

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to divide this one by

Returns:
Type Details
Dse\Numeric

quotient

Dse\Numeric

mod

( Dse\Numeric $num )
Parameters:
Name Type Details
$num Dse\Numeric

a number to divide this one by

Returns:
Type Details
Dse\Numeric

remainder

Dse\Numeric

abs

( )
Returns:
Type Details
Dse\Numeric

absolute value

Dse\Numeric

neg

( )
Returns:
Type Details
Dse\Numeric

negative value

Dse\Numeric

sqrt

( )
Returns:
Type Details
Dse\Numeric

square root

int

toInt

( )
Returns:
Type Details
int

this number as int

float

toDouble

( )
Returns:
Type Details
float

this number as float

static Dse\Float

min

( )

Minimum possible Dse\Float value

Static
This method is static
Returns:
Type Details
Dse\Float

minimum value

static Dse\Float

max

( )

Maximum possible Dse\Float value

Static
This method is static
Returns:
Type Details
Dse\Float

maximum value