@@ -383,5 +383,25 @@ public static partial class mathx
383383 [ MethodImpl ( IL ) ] public static double3 cycle ( this double3 f , int n ) => f . apply ( cycle , n ) ;
384384 /// applies a function to a double4 n times
385385 [ MethodImpl ( IL ) ] public static double4 cycle ( this double4 f , int n ) => f . apply ( cycle , n ) ;
386+
387+
388+ /// <inheritdoc cref="subx(double4, double)"/>
389+ [ MethodImpl ( IL ) ] public static double2 subx ( this double2 f , double x ) => new ( x , f . y ) ;
390+ /// <inheritdoc cref="suby(double4, double)"/>
391+ [ MethodImpl ( IL ) ] public static double2 suby ( this double2 f , double y ) => new ( f . x , y ) ;
392+ /// <inheritdoc cref="subx(double4, double)"/>
393+ [ MethodImpl ( IL ) ] public static double3 subx ( this double3 f , double x ) => new ( x , f . y , f . z ) ;
394+ /// <inheritdoc cref="suby(double4, double)"/>
395+ [ MethodImpl ( IL ) ] public static double3 suby ( this double3 f , double y ) => new ( f . x , y , f . z ) ;
396+ /// <inheritdoc cref="subz(double4, double)"/>
397+ [ MethodImpl ( IL ) ] public static double3 subz ( this double3 f , double z ) => new ( f . x , f . y , z ) ;
398+ /// substitutes the component x
399+ [ MethodImpl ( IL ) ] public static double4 subx ( this double4 f , double x ) => new ( x , f . y , f . z , f . w ) ;
400+ /// substitutes the component y
401+ [ MethodImpl ( IL ) ] public static double4 suby ( this double4 f , double y ) => new ( f . x , y , f . z , f . w ) ;
402+ /// substitutes the component z
403+ [ MethodImpl ( IL ) ] public static double4 subz ( this double4 f , double z ) => new ( f . x , f . y , z , f . w ) ;
404+ /// substitutes the component w
405+ [ MethodImpl ( IL ) ] public static double4 subw ( this double4 f , double w ) => new ( f . x , f . y , f . z , w ) ;
386406 }
387407}
0 commit comments