dotnet / dotnet/dotnet-api-docs

Critical Missing Features:

Open
#1,764 1 comment 0 reactions 0 assignees View on GitHub
area-System.Numerics dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

This is regarding System.Numerics .net 4.7.2
I have the answer to one of them. No Euler:
public const float Deg2Rad = 0.0174532924f;

public Quaternion Euler(float yaw, float pitch, float roll)
{
yaw *= Deg2Rad;
pitch *= Deg2Rad;
roll *= Deg2Rad;

double yawOver2 = yaw * 0.5f;
float cosYawOver2 = (float)Math.Cos(yawOver2);
float sinYawOver2 = (float)Math.Sin(yawOver2);
double pitchOver2 = pitch * 0.5f;
float cosPitchOver2 = (float)Math.Cos(pitchOver2);
float sinPitchOver2 = (float)Math.Sin(pitchOver2);
double rollOver2 = roll * 0.5f;
float cosRollOver2 = (float)Math.Cos(rollOver2);
float sinRollOver2 = (float)Math.Sin(rollOver2);
Quaternion result = new Quaternion();
result.W = cosYawOver2 * cosPitchOver2 * cosRollOver2 + sinYawOver2 * sinPitchOver2 * sinRollOver2;
result.X = sinYawOver2 * cosPitchOver2 * cosRollOver2 + cosYawOver2 * sinPitchOver2 * sinRollOver2;
result.Y = cosYawOver2 * sinPitchOver2 * cosRollOver2 - sinYawOver2 * cosPitchOver2 * sinRollOver2;
result.Z = cosYawOver2 * cosPitchOver2 * sinRollOver2 - sinYawOver2 * sinPitchOver2 * cosRollOver2;

return result;
}

however, the other one that is missing is eulerangles....can't find anything on that...

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 89471a4e-158d-d7f4-447d-b666c6202396
* Version Independent ID: ac30d9b9-87a2-9070-0146-de666dd6e9cf
* Content: [Quaternion Struct (System.Numerics)](https://docs.microsoft.com/en-us/dotnet/api/system.numerics.quaternion?view=netframework-4.7.2)
* Content Source: [xml/System.Numerics/Quaternion.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Numerics/Quaternion.xml)
* Product: **dotnet-api**
* GitHub Login: @rpetrusha
* Microsoft Alias: **ronpet**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.