float2

Description

struct Tinman.Gpu.Types.float2

The built-in type float2.

Public / Constructors

float2


public constructor float2 → (2)

in : float32

The vector component x.

in : float32

The vector component y.

Creates a new vector value.

Public / Operators

operator /

2 overloads


public static operator /1 → (2)

in : float2

The first vector value.

in : float2

The second vector value.

returns → float2

The resulting vector value.

Applies the / operator to the components of the given vectors.


public static operator /2 → (2)

in : float2

The vector value.

in : float32

The scalar value.

returns → float2

The resulting vector value.

Applies the / operator to each component of the given vector.

operator -

3 overloads


public static operator -1 → (2)

in : float2

The first vector value.

in : float2

The second vector value.

returns → float2

The resulting vector value.

Applies the - operator to the components of the given vectors.


public static operator -2 → (2)

in : float2

The vector value.

in : float32

The scalar value.

returns → float2

The resulting vector value.

Applies the - operator to each component of the given vector.


public static operator -3 → (1)

in : float2

The vector value.

returns → float2

The resulting vector value.

Applies the - operator to each component of the given vector.

operator *

2 overloads


public static operator *1 → (2)

in : float2

The first vector value.

in : float2

The second vector value.

returns → float2

The resulting vector value.

Applies the * operator to the components of the given vectors.


public static operator *2 → (2)

in : float2

The vector value.

in : float32

The scalar value.

returns → float2

The resulting vector value.

Applies the * operator to each component of the given vector.

operator +

2 overloads


public static operator +1 → (2)

in : float2

The first vector value.

in : float2

The second vector value.

returns → float2

The resulting vector value.

Applies the + operator to the components of the given vectors.


public static operator +2 → (2)

in : float2

The vector value.

in : float32

The scalar value.

returns → float2

The resulting vector value.

Applies the + operator to each component of the given vector.

operator []


public operator [] → (get,set)

index : int32

The zero-based vector component index.

value : float32

The vector component value.

Returns the index in-th component of this vector.

Public / Attributes

g


public attribute g → (get,set)

value : float32

The vector component value.

Accesses the vector component y by its alternate name g.

gr


public attribute gr → (get,set)

value : float2

The swizzled vector component tuple.

Accesses the vector components as a swizzled (y,x) tuple.

r


public attribute r → (get,set)

value : float32

The vector component value.

Accesses the vector component x by its alternate name r.

rg


public attribute rg → (get,set)

value : float2

The swizzled vector component tuple.

Accesses the vector components as a swizzled (x,y) tuple.

x


public attribute x → (float32)

The vector component x.

xy


public attribute xy → (get,set)

value : float2

The swizzled vector component tuple.

Accesses the vector components as a swizzled (x,y) tuple.

y


public attribute y → (float32)

The vector component y.

yx


public attribute yx → (get,set)

value : float2

The swizzled vector component tuple.

Accesses the vector components as a swizzled (y,x) tuple.