Unity-Technologies / Unity.Mathematics

The C# math library used in Unity providing vector types and math functions with a shader like syntax
Other
1.38k stars 157 forks source link

More implicit conversion #68

Open Wokarol opened 5 years ago

Wokarol commented 5 years ago

I would like to see implicit casting for:

(I have no idea why those don't exist)

Second one will make my code a lot easier to read, instead of (Vector2)camera.WorldToScreenPoint(float3(currentWorldspaceAimCentre, 0)); I will be able to just do camera.WorldToScreenPoint(currentWorldspaceAimCentre)

Koopa1018 commented 2 years ago

Seconding the call for intN <=> VectorNInt. Not sure I would make Vector3 => float2 implicit, but definitely allow implicit float2 => Vector3.

MaratValeev commented 2 months ago

Its still actual... We can use extension method, but i bielive there's more performed way .