public quaternion get_rotateAroundAxe(quaternion Q, double f) { quaternion t = new quaternion(Q.ort(), f / 2); quaternion QQ = this; QQ = t * QQ * t.conj(); return(QQ); }
public quaternion get_rotateAroundAxe(quaternion s, quaternion e, double f) //posoka na zawyrtane: gledame ot E kam S i zavartame obratno na chasovnika { quaternion t = new quaternion((e - s).ort(), f / 2); quaternion QQ = this; QQ = t * (QQ - s) * t.conj(); QQ += s; return(QQ); }
public quaternion set_rotateAroundAxe(quaternion Q, double f) { quaternion t = new quaternion(Q.ort(), f / 2); quaternion QQ = this; QQ = t * QQ * t.conj(); this.q[0] = QQ.q[0]; this.q[1] = QQ.q[1]; this.q[2] = QQ.q[2]; this.q[3] = QQ.q[3]; return(this); }