[DebuggerDisplay("{DebuggerDisplay()}")] public class Vec2 : IComparable<Vec2>
Represents a single, two-dimensional vector.

Constructors

Vec2

#
public Vec2()

Vec2

#
public Vec2(double nX, double nY)
nX (double)
nY (double)

Vec2

#
public Vec2(Vec2 other)
other (Vec2)

Vec2

#
public Vec2(Vector2d other)
other (Vector2d)

Vec2

#
public Vec2(Vector2f other)
other (Vector2f)

Fields

x

#
public double x

y

#
public double y

Properties

DebuggerDisplay

#
public string DebuggerDisplay { get; }

IsValid

#
public bool IsValid { get; }

Unit_X

#
public static Vec2 Unit_X { get; }

Unit_Y

#
public static Vec2 Unit_Y { get; }

Methods

CompareTo

#
public int CompareTo(Vec2 other)
other (Vec2)

CreatePerpendicular

#
public Vec2 CreatePerpendicular()

Duplicate

#
public Vec2 Duplicate()

Length

#
public double Length()

LengthSquared

#
public double LengthSquared()

ParallelTo

#
public Parallax ParallelTo(Vec2 v, double angle_tol)
v (Vec2)
angle_tol (double)

ParallelTo

#
public Parallax ParallelTo(Vec2 v)
v (Vec2)

PerpendicularTo

#
public bool PerpendicularTo(Vec2 v, double angle_tol)
v (Vec2)
angle_tol (double)

PerpendicularTo

#
public bool PerpendicularTo(Vec2 v)
v (Vec2)

Set

#
public void Set(double nX, double nY)
nX (double)
nY (double)

Set

#
public void Set(Vec2 other)
other (Vec2)

ToString

#
public override string ToString()
Object.ToString

Unitize

#
public void Unitize()

Operators

OperationResultDescription
Vec2+Vec2Vec2
Vec2*doubleVec2
Vec2-Vec2Vec2