Skip to content

Commit

Permalink
remove the unnecessary .rotate method
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Jan 19, 2020
1 parent 9918100 commit 55519fc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ Sets or reads the *versor* representation of an *attitude*, as a length-4 array.

Sets or reads the *matrix* representation of an *attitude*, as a matrix of size 3×3.

<!--
<a name="attitude_rotate" href="#attitude_rotate">#</a> *attitude*.<b>rotate</b>(<i>array</i>, <i>p</i>[, <i>accessor</i>])
*rotate* **TBD**.
-->

<a name="attitude_vector" href="#attitude_vector">#</a> *attitude*.<b>vector</b>([<i>vector</i>])

Sets or reads the *vector* representation of an *attitude*, as a length-3 array. That array can be written f(a)B, where f is a function of the rotation’s angle, and B a unit vector respresenting the axis in cartesian coordinates.
Expand Down
3 changes: 0 additions & 3 deletions src/attitude.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ export default function attitude(init = {}) {
)
);

rotate.rotate = _ =>
_ === undefined ? versor_toEulerAngles(q) : MatrixRotatePoint(matrix, _);

rotate.angles = _ =>
_ === undefined
? versor_toEulerAngles(q)
Expand Down
6 changes: 2 additions & 4 deletions test/attitude-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,12 @@ tape("versor from axis,angle", t => {
t.inDelta(
attitude()
.axis([0, 90])
.angle(10)
.rotate([0, 0]),
.angle(10)([0, 0]),
[10, 0]
);
t.inDelta(
attitude()
.versor(versor_fromAxisAngle([0, 90], 10))
.rotate([0, 0]),
.versor(versor_fromAxisAngle([0, 90], 10))([0, 0]),
[10, 0]
);
t.end();
Expand Down

0 comments on commit 55519fc

Please sign in to comment.