public Quaternion(Direction3 vectorPart, double scalarPart) { this.x = vectorPart.x; this.y = vectorPart.y; this.z = vectorPart.z; this.w = scalarPart; }
public static Quaternion CreateFromAxisAngle(Direction3 axis, double angle, AngleUnit inputUnit) { angle = AngleConvert(angle, inputUnit, AngleUnit.Radians); Quaternion quaternion; double num2 = angle * 0.5f; double num = (double)Math.Sin((double)num2); double num3 = (double)Math.Cos((double)num2); quaternion.x = axis.x * num; quaternion.y = axis.y * num; quaternion.z = axis.z * num; quaternion.w = num3; return(quaternion); }
public void Normalize() { this /= new Direction3(magnitude); }
public Point3(Direction3 d) { this.x = d.x; this.y = d.y; this.z = d.z; }