Click or drag to resize

double2 Structure

Represents a 2D vector using two double-precision floating-point numbers.

Namespace:  Fusee.Math.Core
Assembly:  Fusee.Math.Core (in Fusee.Math.Core.dll) Version: 0.7.0.0 (0.1.0.0)
Syntax
C#
public struct double2 : IEquatable<double2>

The double2 type exposes the following members.

Constructors
  NameDescription
Public methoddouble2(double2) Obsolete.
Constructs a new double2 from the given double2.
Public methoddouble2(double3) Obsolete.
Constructs a new double2 from the given double3.
Public methoddouble2(double4) Obsolete.
Constructs a new double2 from the given double4.
Public methoddouble2(Double, Double)
Constructs a new double2.
Top
Properties
  NameDescription
Public propertyLength
Gets the length (magnitude) of the vector.
Public propertyLengthFast
Gets an approximation of the vector length (magnitude).
Public propertyLengthSquared
Gets the square of the vector length (magnitude).
Public propertyStatic memberParse
Gets or sets the Converter object. Has the ability to convert a string to a double2.
Public propertyPerpendicularLeft
Gets the perpendicular vector on the left side of this vector.
Public propertyPerpendicularRight
Gets the perpendicular vector on the right side of this vector.
Top
Methods
  NameDescription
Public methodAdd(double2) Obsolete.
Add the Vector passed as parameter to this instance.
Public methodAdd(double2) Obsolete.
Add the Vector passed as parameter to this instance.
Public methodStatic memberAdd(double2, double2)
Adds two vectors.
Public methodStatic memberAdd(double2, double2, double2)
Adds two vectors.
Public methodStatic memberBarycentric
Interpolate 3 Vectors using Barycentric coordinates
Public methodStatic memberClamp(double2, double2, double2)
Clamp a vector to the given minimum and maximum vectors
Public methodStatic memberClamp(double2, double2, double2, double2)
Clamp a vector to the given minimum and maximum vectors
Public methodStatic memberComponentMax(double2, double2)
Calculate the component-wise maximum of two vectors
Public methodStatic memberComponentMax(double2, double2, double2)
Calculate the component-wise maximum of two vectors
Public methodStatic memberComponentMin(double2, double2)
Calculate the component-wise minimum of two vectors
Public methodStatic memberComponentMin(double2, double2, double2)
Calculate the component-wise minimum of two vectors
Public methodDiv(Double) Obsolete.
Divide this instance by a scalar.
Public methodStatic memberDiv(double2, Double) Obsolete.
Divide a vector by a scalar
Public methodStatic memberDiv(double2, Double, double2) Obsolete.
Divide a vector by a scalar
Public methodStatic memberDivide(double2, double2)
Divides a vector by the components of a vector (scale).
Public methodStatic memberDivide(double2, Double)
Divides a vector by a scalar.
Public methodStatic memberDivide(double2, double2, double2)
Divide a vector by the components of a vector (scale).
Public methodStatic memberDivide(double2, Double, double2)
Divides a vector by a scalar.
Public methodStatic memberDot(double2, double2)
Calculate the dot (scalar) product of two vectors
Public methodStatic memberDot(double2, double2, Double)
Calculate the dot (scalar) product of two vectors
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(double2)
Indicates whether the current vector is equal to another vector.
Public methodStatic memberGetBarycentric
Calculates the barycentric coordinates for the given point in the given triangle, such that u*a + v*b + (1-u-v)*c = point.
Public methodGetHashCode
Returns the hashcode for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsTriangleCW
Determines whether the specified triangle is in clockwise winding order.
Public methodStatic memberLerp(double2, double2, Double)
Returns a new Vector that is the linear blend of the 2 given Vectors
Public methodStatic memberLerp(double2, double2, Double, double2)
Returns a new Vector that is the linear blend of the 2 given Vectors
Public methodStatic memberMax
Returns the double3 with the minimum magnitude
Public methodStatic memberMin
Returns the double3 with the minimum magnitude
Public methodMult(Double) Obsolete.
Multiply this instance by a scalar.
Public methodStatic memberMult(double2, Double) Obsolete.
Multiply a vector and a scalar
Public methodStatic memberMult(double2, Double, double2) Obsolete.
Multiply a vector and a scalar
Public methodStatic memberMultiply(double2, double2)
Multiplies a vector by the components a vector (scale).
Public methodStatic memberMultiply(double2, Double)
Multiplies a vector by a scalar.
Public methodStatic memberMultiply(double2, double2, double2)
Multiplies a vector by the components of a vector (scale).
Public methodStatic memberMultiply(double2, Double, double2)
Multiplies a vector by a scalar.
Public methodNormalize
Scales the double2 to unit length.
Public methodStatic memberNormalize(double2)
Scale a vector to unit length
Public methodStatic memberNormalize(double2, double2)
Scale a vector to unit length
Public methodNormalizeFast
Scales the double2 to approximately unit length.
Public methodStatic memberNormalizeFast(double2)
Scale a vector to approximately unit length
Public methodStatic memberNormalizeFast(double2, double2)
Scale a vector to approximately unit length
Public methodScale(double2) Obsolete.
Scales this instance by the given parameter.
Public methodScale(double2) Obsolete.
Scales this instance by the given parameter.
Public methodScale(Double, Double) Obsolete.
Scales the current double2 by the given amounts.
Public methodSub(double2) Obsolete.
Subtract the Vector passed as parameter from this instance.
Public methodSub(double2) Obsolete.
Subtract the Vector passed as parameter from this instance.
Public methodStatic memberSub(double2, double2) Obsolete.
Subtract one Vector from another
Public methodStatic memberSub(double2, double2, double2) Obsolete.
Subtract one Vector from another
Public methodStatic memberSubtract(double2, double2)
Subtract one Vector from another
Public methodStatic memberSubtract(double2, double2, double2)
Subtract one Vector from another
Public methodToArray
Returns an array of doubles with the two components of the vector.
Public methodToString
Returns a System.String that represents the current double2.
(Overrides ValueTypeToString.)
Public methodStatic memberTransform(double2, QuaternionD)
Transforms a vector by a QuaternionD rotation.
Public methodStatic memberTransform(double2, QuaternionD, double2)
Transforms a vector by a QuaternionD rotation.
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Adds the specified instances.
Public operatorStatic memberDivision
Divides the specified instance by a scalar.
Public operatorStatic memberEquality
Compares the specified instances for equality.
Public operatorStatic memberInequality
Compares the specified instances for inequality.
Public operatorStatic memberMultiply(Double, double2)
Multiplies the specified instance by a scalar.
Public operatorStatic memberMultiply(double2, Double)
Multiplies the specified instance by a scalar.
Public operatorStatic memberSubtraction
Subtracts the specified instances.
Public operatorStatic memberUnaryNegation
Negates the specified instance.
Top
Fields
  NameDescription
Public fieldStatic memberOne
Defines an instance with all components set to 1.
Public fieldStatic memberUnitX
Defines a unit-length double2 that points towards the x-axis.
Public fieldStatic memberUnitY
Defines a unit-length double2 that points towards the y-axis.
Public fieldx
The x component of the double2.
Public fieldy
The y component of the double2.
Public fieldStatic memberZero
Defines a zero-length double2.
Top
Remarks
The double2 structure is suitable for interoperation with unmanaged code requiring two consecutive doubles.
See Also