Unity-Technologies / Unity-Technologies/Unity.Mathematics

Rename quaternion.RotateX() and friends -> quaternion.XRotation()

Open
#46 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.4k
Forks
159
PR merge metrics
No merged PRs in 30d

Description

There is inconsistency right now in the naming of quaternion factory methods, which can lead to confusion (see https://unity.slack.com/archives/CE7DZN2H1/p1546448661023000).

quaternion.RotateX() is named in a such a way that implies the method is going to rotate something, rather than produce a rotation quaternion (cf https://docs.google.com/document/d/1RaGSTzE3d3AN-l73J18nxKlPgIwLCzVdQuWdhYKywbA/edit). To bring them in line with LookRotation(), please consider renaming:

  • RotateX() -> XRotation()
  • RotateY() -> YRotation()
  • RotateZ() -> ZRotation()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating quaternion.RotateX(), RotateY(), and RotateZ() and checking their references in the Unity.Mathematics repository. Done means the factory methods use XRotation(), YRotation(), and ZRotation() consistently and affected references remain aligned.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.