Skip to content

Quaternion::angle shows halves actual angle #564

Description

@kkolyan
    use cgmath::InnerSpace;
    use cgmath::Quaternion;
    use cgmath::Rad;
    use cgmath::Rotation3;

    #[test]
    fn test2() {
        let identity = Quaternion::from_angle_y(Rad(0.0));

        let q = Quaternion::<f32>::from_angle_y(Rad(1.0));

        /*
           assertion `left == right` failed
             left: 1.0 rad
            right: 0.5 rad
        */
        assert_eq!(Rad(1.0), q.angle(identity));
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions