Class (GI Struct)

Graphene-1.0GrapheneVec2

A structure capable of holding a vector with two dimensions, x and y.

The contents of the Graphene.Vec2 structure are private and should never be accessed directly.

Index

Constructors

Properties

$gtype: GType<Vec2>

Methods

  • Initializes a Graphene.Vec2 using the given values.

    This function can be called multiple times.

    Parameters

    • x: number

      the X field of the vector

    • y: number

      the Y field of the vector

    Returns Vec2

    the initialized vector

  • Initializes v with the contents of the given array.

    Parameters

    • src: number[]

      an array of floating point values with at least two elements

    Returns Vec2

    the initialized vector