bgc-c/docs/english/Vector2.md

603 B

Two dimensional vectors

There are two types for two dimensional vectors:

  • BgFP32Vector2 for single precision vectors
  • BgFP64Vector2 for double precision vectors

Vectors of BgFP32Vecto2 type use float (binary32 of IEEE 754) type to store coordinate values.

Vectors of BgFP64Vecto2 type use double (binary64 of IEEE 754) type to store coordinate values.

The both types are structures with two fields: x1 and x2

The definition of the types:

typedef struct
{
    float x1, x2;
} BgFP32Vector2;

typedef struct
{
    double x1, x2;
} BgFP64Vector2;