Struct UIVector2
Definition
- Assembly:
- Tizen.NUI.dll
Defines a value type of vector2.
public struct UIVector2 : IEquatable<UIVector2>
- Implements
-
IEquatable<><UIVector2>
Constructors
View SourceUIVector2(float, float)
Initializes a new instance of the UIVector2 struct.
Declaration
public UIVector2(float x, float y)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The x value. |
| float | y | The y value. |
Fields
View SourceZero
The zero vector2.
Declaration
public static readonly UIVector2 Zero
Field Value
| Type | Description |
|---|---|
| UIVector2 |
Properties
View SourceHeight
Gets the height component of the vector2.
Declaration
public float Height { get; init; }
Property Value
| Type | Description |
|---|---|
| float |
IsZero
Declaration
public readonly bool IsZero { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Width
Gets the width component of the vector2.
Declaration
public float Width { get; init; }
Property Value
| Type | Description |
|---|---|
| float |
X
Gets the x component of the vector2.
Declaration
public float X { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| float |
Y
Gets the y component of the vector2.
Declaration
public float Y { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
View SourceEquals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Equals(UIVector2)
Whether this is equivalent to other.
Declaration
public bool Equals(UIVector2 other)
Parameters
| Type | Name | Description |
|---|---|---|
| UIVector2 | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Operators
View Sourceoperator ==(UIVector2, UIVector2)
Compares two value for equality.
Declaration
public static bool operator ==(UIVector2 operand1, UIVector2 operand2)
Parameters
| Type | Name | Description |
|---|---|---|
| UIVector2 | operand1 | The first operand object. |
| UIVector2 | operand2 | The second operand object. |
Returns
| Type | Description |
|---|---|
| bool | True if both are equal, otherwise false. |
implicit operator Vector3(UIVector2)
Converts the UIVector2 to Vector3 class implicitly.
Declaration
public static implicit operator Vector3(UIVector2 uiVector2)
Parameters
| Type | Name | Description |
|---|---|---|
| UIVector2 | uiVector2 | A UIVector2 to be converted to Vector3 |
Returns
| Type | Description |
|---|---|
| Vector3 |
operator !=(UIVector2, UIVector2)
Compares two value for inequality.
Declaration
public static bool operator !=(UIVector2 operand1, UIVector2 operand2)
Parameters
| Type | Name | Description |
|---|---|---|
| UIVector2 | operand1 | The first operand object. |
| UIVector2 | operand2 | The second operand object. |
Returns
| Type | Description |
|---|---|
| bool | True if both are not equal, otherwise false. |
Implements
IEquatable<>