Commit Graph

9 Commits

Author SHA1 Message Date
Yuval Tassa 77b3533d90 Improve mju_cross implementation.
- Allow in-place cross product a = a x b using `mju_cross(a, a, b)`.
- Easier for compiler to optimize since tmp cannot alias a or b (verified with godbolt).

PiperOrigin-RevId: 547265908
Change-Id: If965867e08c1bc980e71729e38f6855e32de18b2
2023-07-11 12:35:02 -07:00
Kyle Bayes ac1f41160d Add engine internal error macro mjERROR to prepend calling function to error function.
PiperOrigin-RevId: 541584847
Change-Id: I57447e64375413ee07aa96372a402e1ced59ff4a
2023-06-19 03:29:31 -07:00
Yuval Tassa 455b1cd2e2 Add spaces around comparison operators in engine source files.
PiperOrigin-RevId: 535989348
Change-Id: I883f7e82351299933c49b35a31842b5d8d6aea04
2023-05-28 05:02:34 -07:00
Nimrod Gileadi a01318712c Fix a couple of comment typos.
PiperOrigin-RevId: 518347854
Change-Id: I552554fff199ce244b7b364cf0b0486058de0e22
2023-03-21 12:27:53 -07:00
Nimrod Gileadi 8a8305d3ca Avoid unnecessary copies after of mju_mulQuat.
Since fdbbc8bbe0, mju_mulQuat allows in-place computations.
There were a few places where the result was unnecessarily assigned to a temporary variable.

PiperOrigin-RevId: 477746005
Change-Id: I7351ef4796e7d70a4a54b930037bfaadee781f12
2022-09-29 09:33:50 -07:00
Yuval Tassa fdbbc8bbe0 Allow in-place computation for mju_mulQuat and mju_mulQuatAxis
PiperOrigin-RevId: 471222168
Change-Id: If43210636cf20000b343ad1efd02836465380ebe
2022-08-31 04:09:08 -07:00
Kevin Zakka ec7133b0d3 More efficient implementation of mju_rotVecQuat.
```
Before:
BM_RotVecQuat_mean           10.1           10.1    833409628  99.055M items/s

After:
BM_RotVecQuat_mean            6.41           6.41  1200000000  156.095M items/s
```
PiperOrigin-RevId: 454601673
Change-Id: Ibb3ce8a6c838a88bdcebd7aaa979b649639edf0b
2022-06-13 07:16:55 -07:00
Kevin Zakka 53d3220fcc Fix quaternion typos.
PiperOrigin-RevId: 453203844
Change-Id: I7d788c21bb00b7746f941fb2cf755f0b046e35f2
2022-06-06 08:24:21 -07:00
Saran Tunyasuvunakool 1913a02b40 Initial open sourcing of MuJoCo.
PiperOrigin-RevId: 450374687
Change-Id: Ie3225a46ce095fc28ae8e63c326a640261f562bb
2022-05-23 01:08:49 -07:00