Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

double2

struct in Unity.Mathematics

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A 2 component vector of doubles.

Static Properties

Property Description
zerodouble2 zero value.

Properties

Property Description
this[int]Returns the double element at a specified index.
xx component of the vector.
xxSwizzles the vector.
xxxSwizzles the vector.
xxxxSwizzles the vector.
xxxySwizzles the vector.
xxySwizzles the vector.
xxyxSwizzles the vector.
xxyySwizzles the vector.
xySwizzles the vector.
xyxSwizzles the vector.
xyxxSwizzles the vector.
xyxySwizzles the vector.
xyySwizzles the vector.
xyyxSwizzles the vector.
xyyySwizzles the vector.
yy component of the vector.
yxSwizzles the vector.
yxxSwizzles the vector.
yxxxSwizzles the vector.
yxxySwizzles the vector.
yxySwizzles the vector.
yxyxSwizzles the vector.
yxyySwizzles the vector.
yySwizzles the vector.
yyxSwizzles the vector.
yyxxSwizzles the vector.
yyxySwizzles the vector.
yyySwizzles the vector.
yyyxSwizzles the vector.
yyyySwizzles the vector.

Constructors

Constructor Description
double2Constructs a double2 vector from two double values.

Public Methods

Method Description
EqualsReturns true if the double2 is equal to a given double2, false otherwise.
GetHashCodeReturns a hash code for the double2.
ToStringReturns a string representation of the double2.

Operators

Operator Description
double2Implicitly converts a single double value to a double2 vector by assigning it to every component.
double2Explicitly converts a single bool value to a double2 vector by converting it to double and assigning it to every component.
double2Explicitly converts a bool2 vector to a double2 vector by componentwise conversion.
double2Implicitly converts a single int value to a double2 vector by converting it to double and assigning it to every component.
double2Implicitly converts a int2 vector to a double2 vector by componentwise conversion.
double2Implicitly converts a single uint value to a double2 vector by converting it to double and assigning it to every component.
double2Implicitly converts a uint2 vector to a double2 vector by componentwise conversion.
double2Implicitly converts a single half value to a double2 vector by converting it to double and assigning it to every component.
double2Implicitly converts a half2 vector to a double2 vector by componentwise conversion.
double2Implicitly converts a single float value to a double2 vector by converting it to double and assigning it to every component.
double2Implicitly converts a float2 vector to a double2 vector by componentwise conversion.
operator -Returns the result of a componentwise subtraction operation on two double2 vectors.
operator --Returns the result of a componentwise decrement operation on a double2 vector.
operator !=Returns the result of a componentwise not equal operation on two double2 vectors.
operator *Returns the result of a componentwise multiplication operation on two double2 vectors.
operator /Returns the result of a componentwise division operation on two double2 vectors.
operator %Returns the result of a componentwise modulus operation on two double2 vectors.
operator +Returns the result of a componentwise addition operation on two double2 vectors.
operator +Returns the result of a componentwise unary plus operation on a double2 vector.
operator ++Returns the result of a componentwise increment operation on a double2 vector.
operator <Returns the result of a componentwise less than operation on two double2 vectors.
operator <=Returns the result of a componentwise less or equal operation on two double2 vectors.
operator ==Returns the result of a componentwise equality operation on two double2 vectors.
operator >Returns the result of a componentwise greater than operation on two double2 vectors.
operator >=Returns the result of a componentwise greater or equal operation on two double2 vectors.