Skip to content
Reference > Methods

encodeFloat64(value)

Definition

String encodeFloat64(Number value)

Description

Encodes a float to a base64 string prepended with an F. This is the same encoding used in AmiClient::addMessageParamFloatEncoded

Parameter Definition

Name Type Description
value Number float value to encode

Examples

1
2
3
String r1 = encodeFloat64(123.0F); // r1 == FBC9gAA
String r2 = encodeFloat64(-123.0F); // r2 == F_C9gAA
String r3 = encodeFloat64(0); // r3 == FAAAAAA