Skip to content

Swizzle property z and w for int2/float2 and w for int3/float3 #224

Open
@Thaina

Description

@Thaina

Please add complete swizzle property to int2 float2 int3 float3 similar to int4 and float4 and define it as 0

So that we could simply upcast vec2 and vec3 to another dimension easily as downcast vec4 to lower dimension

Such as

var screenPoint = new float2(5,3);
var groundPoint = screenPoint.xzy; // (5,0,3)
var wallPoint = screenPoint.zyx; // (0,3,5)

Alternatively it might be xy0 x0y _0xy yx0 y0x _0yx and maybe xy1 x1y _1xy yx1 y1x _1yx and so on for specific default number

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions