Class Vec2d
- Namespace
- Vintagestory.API.MathTools
- Assembly
- VintagestoryAPI.dll
Represents a vector of 2 doubles. Go bug Tyron of you need more utility methods in this class.
public class Vec2d
- Inheritance
-
Vec2d
- Inherited Members
- Extension Methods
Constructors
Vec2d()
public Vec2d()
Vec2d(double, double)
public Vec2d(double x, double y)
Parameters
Fields
X
public double X
Field Value
Y
public double Y
Field Value
Methods
DistanceTo(double, double)
public double DistanceTo(double targetX, double targetY)
Parameters
Returns
DistanceTo(Vec2d)
public double DistanceTo(Vec2d pos)
Parameters
pos
Vec2d
Returns
Dot(double, double)
public double Dot(double x, double y)
Parameters
Returns
Dot(Vec2d)
public double Dot(Vec2d a)
Parameters
a
Vec2d
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Length()
public double Length()
Returns
LengthSq()
public double LengthSq()
Returns
Normalize()
public Vec2d Normalize()
Returns
Set(double, double)
public Vec2d Set(double x, double z)
Parameters
Returns
Operators
operator +(Vec2d, float)
public static Vec2d operator +(Vec2d left, float right)
Parameters
Returns
operator +(Vec2d, Vec2d)
public static Vec2d operator +(Vec2d left, Vec2d right)
Parameters
Returns
operator +(Vec2d, Vec2i)
public static Vec2d operator +(Vec2d left, Vec2i right)
Parameters
Returns
operator /(Vec2d, float)
public static Vec2d operator /(Vec2d left, float right)
Parameters
Returns
operator ==(Vec2d, Vec2d)
public static bool operator ==(Vec2d left, Vec2d right)
Parameters
Returns
operator !=(Vec2d, Vec2d)
public static bool operator !=(Vec2d left, Vec2d right)
Parameters
Returns
operator *(double, Vec2d)
public static Vec2d operator *(double left, Vec2d right)
Parameters
Returns
operator *(float, Vec2d)
public static Vec2d operator *(float left, Vec2d right)
Parameters
Returns
operator *(Vec2d, double)
public static Vec2d operator *(Vec2d left, double right)
Parameters
Returns
operator *(Vec2d, float)
public static Vec2d operator *(Vec2d left, float right)
Parameters
Returns
operator *(Vec2d, Vec2d)
public static double operator *(Vec2d left, Vec2d right)
Parameters
Returns
operator -(float, Vec2d)
public static Vec2d operator -(float left, Vec2d right)
Parameters
Returns
operator -(Vec2d, float)
public static Vec2d operator -(Vec2d left, float right)
Parameters
Returns
operator -(Vec2d, Vec2d)
public static Vec2d operator -(Vec2d left, Vec2d right)