Show / Hide Table of Contents

Struct Vector2d

Namespace:Mapbox.Utils
Assembly:Mapbox.Utils.dll
Syntax
public struct Vector2d

Constructors

Vector2d(Double, Double)

Declaration
public Vector2d(double x, double y)
Parameters
Type Name Description
System.Double x
System.Double y

Fields

kEpsilon

Declaration
public const double kEpsilon = null
Field Value
Type Description
System.Double

x

Declaration
public double x
Field Value
Type Description
System.Double

y

Declaration
public double y
Field Value
Type Description
System.Double

Properties

Item[Int32]

Declaration
public double this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
System.Double

magnitude

Declaration
public double magnitude { get; }
Property Value
Type Description
System.Double

normalized

Declaration
public Vector2d normalized { get; }
Property Value
Type Description
Vector2d

one

Declaration
public static Vector2d one { get; }
Property Value
Type Description
Vector2d

right

Declaration
public static Vector2d right { get; }
Property Value
Type Description
Vector2d

sqrMagnitude

Declaration
public double sqrMagnitude { get; }
Property Value
Type Description
System.Double

up

Declaration
public static Vector2d up { get; }
Property Value
Type Description
Vector2d

zero

Declaration
public static Vector2d zero { get; }
Property Value
Type Description
Vector2d

Methods

Angle(Vector2d, Vector2d)

Declaration
public static double Angle(Vector2d from, Vector2d to)
Parameters
Type Name Description
Vector2d from
Vector2d to
Returns
Type Description
System.Double

ClampMagnitude(Vector2d, Double)

Declaration
public static Vector2d ClampMagnitude(Vector2d vector, double maxLength)
Parameters
Type Name Description
Vector2d vector
System.Double maxLength
Returns
Type Description
Vector2d

Distance(Vector2d, Vector2d)

Declaration
public static double Distance(Vector2d a, Vector2d b)
Parameters
Type Name Description
Vector2d a
Vector2d b
Returns
Type Description
System.Double

Dot(Vector2d, Vector2d)

Declaration
public static double Dot(Vector2d lhs, Vector2d rhs)
Parameters
Type Name Description
Vector2d lhs
Vector2d rhs
Returns
Type Description
System.Double

Equals(Object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
System.Object other
Returns
Type Description
System.Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

Lerp(Vector2d, Vector2d, Double)

Declaration
public static Vector2d Lerp(Vector2d from, Vector2d to, double t)
Parameters
Type Name Description
Vector2d from
Vector2d to
System.Double t
Returns
Type Description
Vector2d

Max(Vector2d, Vector2d)

Declaration
public static Vector2d Max(Vector2d lhs, Vector2d rhs)
Parameters
Type Name Description
Vector2d lhs
Vector2d rhs
Returns
Type Description
Vector2d

Min(Vector2d, Vector2d)

Declaration
public static Vector2d Min(Vector2d lhs, Vector2d rhs)
Parameters
Type Name Description
Vector2d lhs
Vector2d rhs
Returns
Type Description
Vector2d

MoveTowards(Vector2d, Vector2d, Double)

Declaration
public static Vector2d MoveTowards(Vector2d current, Vector2d target, double maxDistanceDelta)
Parameters
Type Name Description
Vector2d current
Vector2d target
System.Double maxDistanceDelta
Returns
Type Description
Vector2d

Normalize()

Declaration
public void Normalize()

Scale(Vector2d)

Declaration
public void Scale(Vector2d scale)
Parameters
Type Name Description
Vector2d scale

Scale(Vector2d, Vector2d)

Declaration
public static Vector2d Scale(Vector2d a, Vector2d b)
Parameters
Type Name Description
Vector2d a
Vector2d b
Returns
Type Description
Vector2d

Set(Double, Double)

Declaration
public void Set(double new_x, double new_y)
Parameters
Type Name Description
System.Double new_x
System.Double new_y

SqrMagnitude()

Declaration
public double SqrMagnitude()
Returns
Type Description
System.Double

SqrMagnitude(Vector2d)

Declaration
public static double SqrMagnitude(Vector2d a)
Parameters
Type Name Description
Vector2d a
Returns
Type Description
System.Double

ToArray()

Declaration
public double[] ToArray()
Returns
Type Description
System.Double[]

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

Addition(Vector2d, Vector2d)

Declaration
public static Vector2d operator +(Vector2d a, Vector2d b)
Parameters
Type Name Description
Vector2d a
Vector2d b
Returns
Type Description
Vector2d

Division(Vector2d, Double)

Declaration
public static Vector2d operator /(Vector2d a, double d)
Parameters
Type Name Description
Vector2d a
System.Double d
Returns
Type Description
Vector2d

Equality(Vector2d, Vector2d)

Declaration
public static bool operator ==(Vector2d lhs, Vector2d rhs)
Parameters
Type Name Description
Vector2d lhs
Vector2d rhs
Returns
Type Description
System.Boolean

Inequality(Vector2d, Vector2d)

Declaration
public static bool operator !=(Vector2d lhs, Vector2d rhs)
Parameters
Type Name Description
Vector2d lhs
Vector2d rhs
Returns
Type Description
System.Boolean

Multiply(Vector2d, Double)

Declaration
public static Vector2d operator *(Vector2d a, double d)
Parameters
Type Name Description
Vector2d a
System.Double d
Returns
Type Description
Vector2d

Multiply(Single, Vector2d)

Declaration
public static Vector2d operator *(float d, Vector2d a)
Parameters
Type Name Description
System.Single d
Vector2d a
Returns
Type Description
Vector2d

Subtraction(Vector2d, Vector2d)

Declaration
public static Vector2d operator -(Vector2d a, Vector2d b)
Parameters
Type Name Description
Vector2d a
Vector2d b
Returns
Type Description
Vector2d

UnaryNegation(Vector2d)

Declaration
public static Vector2d operator -(Vector2d a)
Parameters
Type Name Description
Vector2d a
Returns
Type Description
Vector2d
Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX