Optionalproperties: Partial<{}>Since 1.0addSince 1.0divideSince 1.0dotComputes the dot product of the two given vectors.
the dot product of the vectors
Since 1.2equalChecks whether the two given Graphene.Vec2 are equal.
true if the two vectors are equal, and false otherwise
Since 1.0freeSince 1.0get_Since 1.0get_Since 1.0initInitializes a Graphene.Vec2 using the given values.
This function can be called multiple times.
the X field of the vector
the Y field of the vector
the initialized vector
Since 1.0init_Initializes v with the contents of the given array.
an array of floating point values with at least two elements
the initialized vector
Since 1.0init_Since 1.10interpolateSince 1.0lengthSince 1.0maxSince 1.0minSince 1.0multiplySince 1.2nearCompares the two given Graphene.Vec2 vectors and checks
whether their values are within the given epsilon.
the threshold between the two vectors
true if the two vectors are near each other
Since 1.2negateSince 1.0normalizeSince 1.2scaleMultiplies all components of the given vector with the given scalar factor.
the scalar factor
Since 1.0subtractSince 1.0to_StaticallocStaticSince 1.0oneStaticSince 1.0x_StaticSince 1.0y_StaticSince 1.0zero
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.