/// <summary> /// /// </summary> /// <param name="other"></param> /// <param name="tolerance"></param> /// <returns></returns> public bool ApproxEquals(OrthoBasis2d other, double tolerance = zMath.ZeroTolerance) { return(_x.ApproxEquals(other._x, tolerance)); }
/// <summary> /// Creates a relative rotation from t0 to t1. /// </summary> /// <param name="from"></param> /// <param name="to"></param> /// <returns></returns> public static OrthoBasis2d CreateFromTo(OrthoBasis2d from, OrthoBasis2d to) { return(to.Apply(from.Inverse)); }
/// <summary> /// Applies the inverse of this rotation to the given rotation. /// </summary> /// <param name="other"></param> public OrthoBasis2d ApplyInverse(OrthoBasis2d other) { other._x = ApplyInverse(other._x); return(other); }
/// <summary> /// Applies this rotation to the given rotation. /// </summary> /// <param name="other"></param> public OrthoBasis2d Apply(OrthoBasis2d other) { other._x = Apply(other._x); return(other); }
/// <summary> /// /// </summary> /// <param name="rotation"></param> /// <param name="translation"></param> public Orient2d(OrthoBasis2d rotation, Vec2d translation) { Rotation = rotation; Translation = translation; }
/// <summary> /// /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="z"></param> public void Deconstruct(out OrthoBasis2d rotation, out Vec2d translation) { rotation = Rotation; translation = Translation; }
/// <summary> /// /// </summary> /// <param name="origin"></param> /// <param name="x"></param> public Orient2d(Vec2d origin, Vec2d x) { Rotation = new OrthoBasis2d(x); Translation = origin; }