Table of Contents

Class Vec2

Namespace
Graphene
Assembly
Graphene-1.0.dll
public sealed class Vec2 : BoxedRecord, GTypeProvider, InstanceFactory, IEquatable<Vec2>, IDisposable
Inheritance
Vec2
Implements
Inherited Members

Constructors

Vec2()

public Vec2()

Vec2(Vec2OwnedHandle)

public Vec2(Vec2OwnedHandle handle)

Parameters

handle Vec2OwnedHandle

Properties

Handle

public Vec2OwnedHandle Handle { get; }

Property Value

Vec2OwnedHandle

Methods

Add(Vec2, out Vec2)

[Version("1.0")]
public void Add(Vec2 b, out Vec2 res)

Parameters

b Vec2
res Vec2

Alloc()

[Version("1.0")]
public static Vec2 Alloc()

Returns

Vec2

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Divide(Vec2, out Vec2)

[Version("1.0")]
public void Divide(Vec2 b, out Vec2 res)

Parameters

b Vec2
res Vec2

Dot(Vec2)

[Version("1.0")]
public float Dot(Vec2 b)

Parameters

b Vec2

Returns

float

Equal(Vec2)

[Version("1.2")]
public bool Equal(Vec2 v2)

Parameters

v2 Vec2

Returns

bool

Equals(Vec2?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Vec2? other)

Parameters

other Vec2

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Free()

[Version("1.0")]
public void Free()

GetGType()

public static Type GetGType()

Returns

Type

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetX()

[Version("1.0")]
public float GetX()

Returns

float

GetY()

[Version("1.0")]
public float GetY()

Returns

float

Init(float, float)

[Version("1.0")]
public Vec2 Init(float x, float y)

Parameters

x float
y float

Returns

Vec2

InitFromVec2(Vec2)

[Version("1.0")]
public Vec2 InitFromVec2(Vec2 src)

Parameters

src Vec2

Returns

Vec2

Interpolate(Vec2, double, out Vec2)

[Version("1.10")]
public void Interpolate(Vec2 v2, double factor, out Vec2 res)

Parameters

v2 Vec2
factor double
res Vec2

Length()

[Version("1.0")]
public float Length()

Returns

float

Max(Vec2, out Vec2)

[Version("1.0")]
public void Max(Vec2 b, out Vec2 res)

Parameters

b Vec2
res Vec2

Min(Vec2, out Vec2)

[Version("1.0")]
public void Min(Vec2 b, out Vec2 res)

Parameters

b Vec2
res Vec2

Multiply(Vec2, out Vec2)

[Version("1.0")]
public void Multiply(Vec2 b, out Vec2 res)

Parameters

b Vec2
res Vec2

Near(Vec2, float)

[Version("1.2")]
public bool Near(Vec2 v2, float epsilon)

Parameters

v2 Vec2
epsilon float

Returns

bool

Negate(out Vec2)

[Version("1.2")]
public void Negate(out Vec2 res)

Parameters

res Vec2

Normalize(out Vec2)

[Version("1.0")]
public void Normalize(out Vec2 res)

Parameters

res Vec2

One()

[Version("1.0")]
public static Vec2 One()

Returns

Vec2

Scale(float, out Vec2)

[Version("1.2")]
public void Scale(float factor, out Vec2 res)

Parameters

factor float
res Vec2

Subtract(Vec2, out Vec2)

[Version("1.0")]
public void Subtract(Vec2 b, out Vec2 res)

Parameters

b Vec2
res Vec2

XAxis()

[Version("1.0")]
public static Vec2 XAxis()

Returns

Vec2

YAxis()

[Version("1.0")]
public static Vec2 YAxis()

Returns

Vec2

Zero()

[Version("1.0")]
public static Vec2 Zero()

Returns

Vec2