Edit

Share via


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
Vector2d
Attributes
Implements

Constructors

Vector2d(Double, Double)

Constructs left vector with the given coordinates.

Vector2d(Double)

Fields

One

Defines an instance with all components set to 1.

SizeInBytes

Defines the size of the Vector2d struct in bytes.

UnitX

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

UnitY

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

X

The X coordinate of this instance.

Y

The Y coordinate of this instance.

Zero

Defines a zero-length Vector2d.

Properties

Length

Gets the length (magnitude) of the vector.

LengthSquared

Gets the square of the vector length (magnitude).

PerpendicularLeft

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

PerpendicularRight

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

Methods

Add(Vector2d, Vector2d, Vector2d)

Add two Vectors

Add(Vector2d, Vector2d)
Add(Vector2d)
Obsolete.

Add the Vector passed as parameter to this instance.

Add(Vector2d)
Obsolete.

Add the Vector passed as parameter to this instance.

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

Clamp a vector to the given minimum and maximum vectors

Clamp(Vector2d, Vector2d, Vector2d)
Div(Double)
Obsolete.

Divide this instance by a scalar.

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

Calculate the dot (scalar) product of two vectors

Equals(Object)

Indicates whether this instance and a specified object are equal.

Equals(Vector2d)

Indicates whether the current vector is equal to another vector.

GetHashCode()

Returns the hashcode for this instance.

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

Calculate the component-wise maximum of two vectors

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

Calculate the component-wise minimum of two vectors

Min(Vector2d, Vector2d)
Mult(Double)
Obsolete.

Multiply this instance by a scalar.

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

Scales the Vector2 to unit length.

Normalize(Vector2d, Vector2d)

Scale a vector to unit length

Normalize(Vector2d)
NormalizeFast(Vector2d, Vector2d)

Scale a vector to approximately unit length

NormalizeFast(Vector2d)
Scale(Double, Double)
Obsolete.

Scales the current Vector2 by the given amounts.

Scale(Vector2d)
Obsolete.

Scales this instance by the given parameter.

Scale(Vector2d)
Obsolete.

Scales this instance by the given parameter.

Sub(Vector2d, Vector2d, Vector2d)
Obsolete.

Subtract one Vector from another

Sub(Vector2d, Vector2d)
Sub(Vector2d)
Obsolete.

Subtract the Vector passed as parameter from this instance.

Sub(Vector2d)
Obsolete.

Subtract the Vector passed as parameter from this instance.

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

Returns a System.String that represents the current instance.

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

Operators

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

Compares two instances for equality.

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

Compares two instances for ienquality.

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

Applies to