Operator implicit operator
implicit operator float2(float)
Implicitly converts a single float value to a float2 vector by assigning it to every component.
Declaration
public static implicit operator float2(float v)
Parameters
Type | Name | Description |
---|---|---|
float | v | float to convert to float2 |
Returns
Type | Description |
---|---|
float2 | Converted value. |
implicit operator float2(int)
Implicitly converts a single int value to a float2 vector by converting it to float and assigning it to every component.
Declaration
public static implicit operator float2(int v)
Parameters
Type | Name | Description |
---|---|---|
int | v | int to convert to float2 |
Returns
Type | Description |
---|---|
float2 | Converted value. |
implicit operator float2(int2)
Implicitly converts a int2 vector to a float2 vector by componentwise conversion.
Declaration
public static implicit operator float2(int2 v)
Parameters
Type | Name | Description |
---|---|---|
int2 | v | int2 to convert to float2 |
Returns
Type | Description |
---|---|
float2 | Converted value. |
implicit operator float2(uint)
Implicitly converts a single uint value to a float2 vector by converting it to float and assigning it to every component.
Declaration
public static implicit operator float2(uint v)
Parameters
Type | Name | Description |
---|---|---|
uint | v | uint to convert to float2 |
Returns
Type | Description |
---|---|
float2 | Converted value. |
implicit operator float2(uint2)
Implicitly converts a uint2 vector to a float2 vector by componentwise conversion.
Declaration
public static implicit operator float2(uint2 v)
Parameters
Type | Name | Description |
---|---|---|
uint2 | v | uint2 to convert to float2 |
Returns
Type | Description |
---|---|
float2 | Converted value. |
implicit operator float2(half)
Implicitly converts a single half value to a float2 vector by converting it to float and assigning it to every component.
Declaration
public static implicit operator float2(half v)
Parameters
Type | Name | Description |
---|---|---|
half | v | half to convert to float2 |
Returns
Type | Description |
---|---|
float2 | Converted value. |
implicit operator float2(half2)
Implicitly converts a half2 vector to a float2 vector by componentwise conversion.
Declaration
public static implicit operator float2(half2 v)
Parameters
Type | Name | Description |
---|---|---|
half2 | v | half2 to convert to float2 |
Returns
Type | Description |
---|---|
float2 | Converted value. |
implicit operator Vector2(float2)
Converts a float2 to Vector2.
Declaration
public static implicit operator Vector2(float2 v)
Parameters
Type | Name | Description |
---|---|---|
float2 | v | float2 to convert. |
Returns
Type | Description |
---|---|
Vector2 | The converted Vector2. |
implicit operator float2(Vector2)
Converts a Vector2 to float2.
Declaration
public static implicit operator float2(Vector2 v)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | v | Vector2 to convert. |
Returns
Type | Description |
---|---|
float2 | The converted float2. |