public static tv2 DCircle(tfloat period, tfloat radius, tfloat time) { var w = VFloat(); var t = VFloat(); return(Ex.Block(new[] { w, t }, w.Is(tau.Div(period)), t.Is(w.Mul(time)), w.Mul(radius).Mul(V2(EN1.Mul(Sin(t)), Cos(t))) )); }
private static SyncPattern _FArrow(ExBPY indexer, ExBPY n, ExBPY xstep, ExBPY ystep, GenCtxProperty[] props, GCXU <VTP> path, string?poolSuffix, string?locSave, string?dirSave, params SyncPattern[] extraSp) { return(GuideEmpty(poolSuffix, indexer, AutoSaveV2(locSave ??= V2Key, dirSave ??= V2Key), AutoSaveF, path, extraSp.Append( GSRepeat2(GCXF <float>(x => n(x).Mul(n(x).Add(E1)).Div(E2)), RV2Zero, new[] { PreLoop(new GCRule[] { new GCRule <float>(ExType.Float, xi, GCOperator.Assign, GCXF(x => Floor(EN05.Add( Sqrt(E025.Add(E2.Mul(x.t))) )))), new GCRule <float>(ExType.Float, yi, GCOperator.Assign, GCXF(x => Sub(T()(x), E05.Mul( Sqr(rxi(x)).Add(E2.Mul(rxi(x))))) )) }) }.Concat(props).ToArray(), new [] { DS(HV2(locSave), HV2(dirSave), P(), Parametrics.PXY( x => EN1.Mul(xstep(x)).Mul(rxi(x)), x => ystep(x).Mul(ryi(x)) )) }) ).ToArray())); }
/// <summary> /// Returns -x. /// </summary> public static tfloat Neg(tfloat x) => EN1.Mul(x);