Search Feedback

3
votes

Underprecate Quaternion.AxisAngle or provide an alternative under different name

Scripting

-

-

As far as I understand, Unity strives to provide a consistent degree-based API. That's why Quaternion.AxisAngle (taking its angle in radians) was deprecated in favor of Quaternion.AngleAxis (which takes degrees). There is nothing wrong with degrees per se, but a lot of computations are naturally done in radians; if this is the case, the programmer is forced to convert their result to degrees just for Quaternion class to immediately convert it back to radians. This means two unnecessary floating-point multiplications which give nothing but performance and precision loss.

Of course, having both AxisAngle and AngleAxis is misleading. But how about AngleAxisRad?

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(10797)

2D

(282)

Ads

(56)

AI & Navigation

(84)

Analytics

(133)

Animation

(396)

Asset Store

(356)

Asset Store Publisher

(17)

Assets

(544)

Audio

(185)

Cloud Build

(145)

Collaborate

(65)

Docs & Tutorials

(240)

Editor

(2513)

Everyplay

(19)

Game Performance Reporting

(22)

General

(981)

Graphics

(870)

GUI

(432)

Input

(173)

Licensing

(92)

Networking

(189)

Physics

(384)

Platforms

(442)

Profiling & Optimization

(85)

Runtime

(182)

Scripting

(1169)

Terrain

(172)

WebGL

(143)