projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/telelco-v3.0: Merge info into one screen
[fw/altos]
/
altoslib
/
AltosRotation.java
diff --git
a/altoslib/AltosRotation.java
b/altoslib/AltosRotation.java
index fb84969ce7f8079537b20df704087d34edae357f..85e213b25f5a0ef0700c3151b6723ee8ff34b925 100644
(file)
--- a/
altoslib/AltosRotation.java
+++ b/
altoslib/AltosRotation.java
@@
-16,7
+16,7
@@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altoslib_1
3
;
+package org.altusmetrum.altoslib_1
4
;
public class AltosRotation extends AltosQuaternion {
private AltosQuaternion rotation;
public class AltosRotation extends AltosQuaternion {
private AltosQuaternion rotation;
@@
-97,7
+97,7
@@
public class AltosRotation extends AltosQuaternion {
double z,
int pad_orientation) {
AltosQuaternion orient = AltosQuaternion.vector(x, y, z).normalize();
double z,
int pad_orientation) {
AltosQuaternion orient = AltosQuaternion.vector(x, y, z).normalize();
- double sky =
pad_orientation
== 0 ? 1 : -1;
+ double sky =
(pad_orientation & 1)
== 0 ? 1 : -1;
AltosQuaternion up = new AltosQuaternion(0, 0, 0, sky);
rotation = up.vectors_to_rotation(orient);
}
AltosQuaternion up = new AltosQuaternion(0, 0, 0, sky);
rotation = up.vectors_to_rotation(orient);
}