GeoGen Script reference
Contructors
Number Class Reference

Double precision floating point number as specified by the IEEE 754 standard. More...

Contructors

static Number FromCoordinate (Coordinate coordinate, Direction direction)
 Converts coordinate to a number. More...
 
static Number FromEnum (Enum enumValue)
 Converts an enumValue to its corresponding numeric value. More...
 

Detailed Description

Double precision floating point number as specified by the IEEE 754 standard.

This class is used to represent both integers and non-integers - there is no dedicated integer type.

The range of allowed numbers is -1.7*10308 to 1.7*10308.

Number supports all operators expected from a numeric type in a programming language. If operation would result in an non-number value (NaN/infinity) a runtime error will be triggered instead.

Number object can be created using a literal:

var a = 5.68;
var b = 3 + b;

Member Function Documentation

static Number Number.FromCoordinate ( Coordinate  coordinate,
Direction  direction 
)
static

Converts coordinate to a number.

If the coordinate is relative, direction has to be specified. If coordinate is absolute, direction will be ignored.

Parameters
coordinateThe coordinate.
direction(optional) The direction.
Returns
Numeric value of coordinate. If coordinate was relative, it will be converted to an absolute coordinate.
static Number Number.FromEnum ( Enum  enumValue)
static

Converts an enumValue to its corresponding numeric value.

Enum can be any enumeration type.

Parameters
enumValueThe enum value.
Returns
Numeric value of enumValue.