Vector2

Overview

Vector2 is a struct in Aspose.3D FOSS for .NET. Inherits from: IComparable<Vector2>, IEquatable<Vector2>.

Vector2.Vector2 creates a new vector with the specified X and Y float components.

Properties

NameTypeAccessDescription
UdoubleRead/WriteGets or sets the first (U) component of the vector
VdoubleRead/WriteGets or sets the second (V) component of the vector
LengthdoubleReadReturns the Euclidean length (magnitude) of the vector

Methods

SignatureDescription
Vector2(s: double)Creates a 2‑D vector from a Vector3, using its X and Y components
Vector2(x: double, y: double)
Vector2(s: Vector3)
Vector2(vec: FVector2)
Dot(rhs: Vector2)Returns the dot product of this vector and the right‑hand side vector
Equals(rhs: Vector2)Returns true if both components equal those of the given Vector2
Equals(obj: object?)
GetHashCode()Returns a hash code derived from the vector’s components
ToString()
Cross(v: Vector2)Returns the scalar (z‑component) cross product of two 2‑D vectors
Normalize()Scales the vector to have a length of one
CompareTo(other: Vector2)Compares this vector with another Vector2, typically by length