public IVector2 direction(IVector2 from) { FixVector2 ret = value; if (from is TVector2) { ret -= ((TVector2)from).value; } else { ret -= new FixVector2((Fix64)from.x().value, (Fix64)from.y().value); } return(new TVector2(ret.normalized)); }
public static FixVector2 toFixVector2(this IVector2 value) { var t = value as TVector2; return(t != null ? t.value : new FixVector2(value.x().toFix64(), value.y().toFix64())); }