Skip to content
Reference > Classes

Float

Definition

Float var = .... ;

Extends

Extended By

None

Description

A number of type Float.

Method Summary

Owner Name Return Type Description
Float constructor(value) Object Initialize a 32 bit Float object.
Float byteValue() Byte Returns the value of this Float as a Byte after a narrowing primitive conversion.
Object getClassName() String Returns the string name of this object's class type.
Float isFinite() Boolean Returns "true" if this Float has a finite value; returns "false" otherwise (for NaN and infinity arguments).
Float isInfinite() Boolean Returns "true" if this Float is infinitely large in magnitude, "false" otherwise.
Float isNaN() Boolean Returns "true" if this Float instance is Not-a-Number (NaN) value, "false" otherwise.
Object toJson() String Returns a string of a json representation of this object.

Method Definitions


constructor(value)

Float float = new Float(Float value)

Description

Initialize a 32 bit Float object.

Parameter Definition

Name Type Description
value Float  a float value

Example 1

1
2
3
Float f = 0.5f;

// f = 0.5

byteValue()

Byte Float::byteValue()

Description

Returns the value of this Float as a Byte after a narrowing primitive conversion.

Example 1

1
2
3
4
Float f = 0.5;
f.byteValue();

// f.byteValue() = 0

getClassName()

String Object::getClassName()

Description

Returns the string name of this object's class type.


isFinite()

Boolean Float::isFinite()

Description

Returns "true" if this Float has a finite value; returns "false" otherwise (for NaN and infinity arguments).

Example 1

1
2
3
4
Float f = 0.5;
f.isFinite();

// f.isFinite() = true

isInfinite()

Boolean Float::isInfinite()

Description

Returns "true" if this Float is infinitely large in magnitude, "false" otherwise.

Example 1

1
2
3
4
Float f = 1f/0f;
f.isInfinite();

// f.isInfinite() = true

isNaN()

Boolean Float::isNaN()

Description

Returns "true" if this Float instance is Not-a-Number (NaN) value, "false" otherwise.

Example 1

1
2
3
4
Float f = power(-1,0.5f);
f.isNaN();

// f.isNaN() = true

toJson()

String Object::toJson()

Description

Returns a string of a json representation of this object.