Vector2d Vector2d Struct

Definition

Represents a 2D vector using two double-precision floating-point numbers.

[System.Serializable]
public struct Vector2d : IEquatable<OpenTK.Vector2d>
type Vector2d = struct
Inheritance
Vector2dVector2d
Attributes
Implements

Constructors

Vector2d(Double) Vector2d(Double)
Vector2d(Double, Double) Vector2d(Double, Double)

Constructs left vector with the given coordinates.

Fields

One One

Defines an instance with all components set to 1.

SizeInBytes SizeInBytes

Defines the size of the Vector2d struct in bytes.

UnitX UnitX

Defines a unit-length Vector2d that points towards the X-axis.

UnitY UnitY

Defines a unit-length Vector2d that points towards the Y-axis.

X X

The X coordinate of this instance.

Y Y

The Y coordinate of this instance.

Zero Zero

Defines a zero-length Vector2d.

Properties

Length Length

Gets the length (magnitude) of the vector.

LengthSquared LengthSquared

Gets the square of the vector length (magnitude).

PerpendicularLeft PerpendicularLeft

Gets the perpendicular vector on the left side of this vector.

PerpendicularRight PerpendicularRight

Gets the perpendicular vector on the right side of this vector.

Methods

Add(Vector2d) Add(Vector2d)

Add the Vector passed as parameter to this instance.

Add(Vector2d) Add(Vector2d)

Add the Vector passed as parameter to this instance.

Add(Vector2d, Vector2d) Add(Vector2d, Vector2d)
Add(Vector2d, Vector2d, Vector2d) Add(Vector2d, Vector2d, Vector2d)

Add two Vectors

BaryCentric(Vector2d, Vector2d, Vector2d, Double, Double) BaryCentric(Vector2d, Vector2d, Vector2d, Double, Double)
BaryCentric(Vector2d, Vector2d, Vector2d, Double, Double, Vector2d) BaryCentric(Vector2d, Vector2d, Vector2d, Double, Double, Vector2d)
Clamp(Vector2d, Vector2d, Vector2d) Clamp(Vector2d, Vector2d, Vector2d)
Clamp(Vector2d, Vector2d, Vector2d, Vector2d) Clamp(Vector2d, Vector2d, Vector2d, Vector2d)

Clamp a vector to the given minimum and maximum vectors

Div(Double) Div(Double)

Divide this instance by a scalar.

Div(Vector2d, Double) Div(Vector2d, Double)
Div(Vector2d, Double, Vector2d) Div(Vector2d, Double, Vector2d)
Divide(Vector2d, Vector2d, Vector2d) Divide(Vector2d, Vector2d, Vector2d)
Divide(Vector2d, Double, Vector2d) Divide(Vector2d, Double, Vector2d)
Divide(Vector2d, Vector2d) Divide(Vector2d, Vector2d)
Divide(Vector2d, Double) Divide(Vector2d, Double)
Dot(Vector2d, Vector2d) Dot(Vector2d, Vector2d)

Calculate the dot (scalar) product of two vectors

Dot(Vector2d, Vector2d, Double) Dot(Vector2d, Vector2d, Double)
Equals(Vector2d) Equals(Vector2d)

Indicates whether the current vector is equal to another vector.

Equals(Object) Equals(Object)

Indicates whether this instance and a specified object are equal.

GetHashCode() GetHashCode()

Returns the hashcode for this instance.

Lerp(Vector2d, Vector2d, Double, Vector2d) Lerp(Vector2d, Vector2d, Double, Vector2d)
Lerp(Vector2d, Vector2d, Double) Lerp(Vector2d, Vector2d, Double)
Max(Vector2d, Vector2d) Max(Vector2d, Vector2d)
Max(Vector2d, Vector2d, Vector2d) Max(Vector2d, Vector2d, Vector2d)

Calculate the component-wise maximum of two vectors

Min(Vector2d, Vector2d) Min(Vector2d, Vector2d)
Min(Vector2d, Vector2d, Vector2d) Min(Vector2d, Vector2d, Vector2d)

Calculate the component-wise minimum of two vectors

Mult(Double) Mult(Double)

Multiply this instance by a scalar.

Mult(Vector2d, Double) Mult(Vector2d, Double)
Mult(Vector2d, Double, Vector2d) Mult(Vector2d, Double, Vector2d)
Multiply(Vector2d, Vector2d, Vector2d) Multiply(Vector2d, Vector2d, Vector2d)
Multiply(Vector2d, Double, Vector2d) Multiply(Vector2d, Double, Vector2d)
Multiply(Vector2d, Vector2d) Multiply(Vector2d, Vector2d)
Multiply(Vector2d, Double) Multiply(Vector2d, Double)
Normalize() Normalize()

Scales the Vector2 to unit length.

Normalize(Vector2d) Normalize(Vector2d)
Normalize(Vector2d, Vector2d) Normalize(Vector2d, Vector2d)

Scale a vector to unit length

NormalizeFast(Vector2d) NormalizeFast(Vector2d)
NormalizeFast(Vector2d, Vector2d) NormalizeFast(Vector2d, Vector2d)

Scale a vector to approximately unit length

Scale(Vector2d) Scale(Vector2d)

Scales this instance by the given parameter.

Scale(Vector2d) Scale(Vector2d)

Scales this instance by the given parameter.

Scale(Double, Double) Scale(Double, Double)

Scales the current Vector2 by the given amounts.

Sub(Vector2d) Sub(Vector2d)

Subtract the Vector passed as parameter from this instance.

Sub(Vector2d) Sub(Vector2d)

Subtract the Vector passed as parameter from this instance.

Sub(Vector2d, Vector2d) Sub(Vector2d, Vector2d)
Sub(Vector2d, Vector2d, Vector2d) Sub(Vector2d, Vector2d, Vector2d)

Subtract one Vector from another

Subtract(Vector2d, Vector2d, Vector2d) Subtract(Vector2d, Vector2d, Vector2d)
Subtract(Vector2d, Vector2d) Subtract(Vector2d, Vector2d)
ToString() ToString()

Returns a System.String that represents the current instance.

Transform(Vector2d, Quaterniond) Transform(Vector2d, Quaterniond)
Transform(Vector2d, Quaterniond, Vector2d) Transform(Vector2d, Quaterniond, Vector2d)

Operators

Addition(Vector2d, Vector2d) Addition(Vector2d, Vector2d)
Division(Vector2d, Double) Division(Vector2d, Double)
Equality(Vector2d, Vector2d) Equality(Vector2d, Vector2d)

Compares two instances for equality.

Explicit(Vector2 to Vector2d) Explicit(Vector2 to Vector2d)
Explicit(Vector2d to Vector2) Explicit(Vector2d to Vector2)
Inequality(Vector2d, Vector2d) Inequality(Vector2d, Vector2d)

Compares two instances for ienquality.

Multiply(Vector2d, Double) Multiply(Vector2d, Double)
Multiply(Double, Vector2d) Multiply(Double, Vector2d)
Subtraction(Vector2d, Vector2d) Subtraction(Vector2d, Vector2d)
UnaryNegation(Vector2d) UnaryNegation(Vector2d)

Applies to