Unity-Technologies / Unity-Technologies/Unity.Mathematics
devide int3 by float
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
Not really a biggy, but currently I can't devide an int3 by a float directly, without explicitly casting the int3 to a float3 first. (Is true for int2 and int4 aswell).
So basically, what I would like is this operator.
public static float3 operator / (int3 lhs, float rhs)
{ return new float3 (lhs.x / rhs, lhs.y / rhs, lhs.z / rhs); }
So that when I want to devide my int3 by a float, I don't have to explicitly cast my int3 to a float3 first.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the C# definitions and existing division operators for int2, int3, and int4 in the Unity.Mathematics repository. Compare their current conversion and operator behavior, then verify that division by a float produces the corresponding float vector types for all three integer vector types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100