@@ -384,24 +384,24 @@ public static partial class mathx
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 ) ;
386386
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 ) ;
387+ // Swap components
388+ /// <inheritdoc cref="swapx(Unity.Mathematics. double4,double)"/>
389+ [ MethodImpl ( IL ) ] public static double2 swapx ( this double2 f , double x ) => new ( x , f . y ) ;
390+ /// <inheritdoc cref="swapy(Unity.Mathematics. double4,double)"/>
391+ [ MethodImpl ( IL ) ] public static double2 swapy ( this double2 f , double y ) => new ( f . x , y ) ;
392+ /// <inheritdoc cref="swapx(Unity.Mathematics. double4,double)"/>
393+ [ MethodImpl ( IL ) ] public static double3 swapx ( this double3 f , double x ) => new ( x , f . y , f . z ) ;
394+ /// <inheritdoc cref="swapy(Unity.Mathematics. double4,double)"/>
395+ [ MethodImpl ( IL ) ] public static double3 swapy ( this double3 f , double y ) => new ( f . x , y , f . z ) ;
396+ /// <inheritdoc cref="swapz(Unity.Mathematics. double4,double)"/>
397+ [ MethodImpl ( IL ) ] public static double3 swapz ( this double3 f , double z ) => new ( f . x , f . y , z ) ;
398398 /// substitutes the component x
399- [ MethodImpl ( IL ) ] public static double4 subx ( this double4 f , double x ) => new ( x , f . y , f . z , f . w ) ;
399+ [ MethodImpl ( IL ) ] public static double4 swapx ( this double4 f , double x ) => new ( x , f . y , f . z , f . w ) ;
400400 /// substitutes the component y
401- [ MethodImpl ( IL ) ] public static double4 suby ( this double4 f , double y ) => new ( f . x , y , f . z , f . w ) ;
401+ [ MethodImpl ( IL ) ] public static double4 swapy ( this double4 f , double y ) => new ( f . x , y , f . z , f . w ) ;
402402 /// substitutes the component z
403- [ MethodImpl ( IL ) ] public static double4 subz ( this double4 f , double z ) => new ( f . x , f . y , z , f . w ) ;
403+ [ MethodImpl ( IL ) ] public static double4 swapz ( this double4 f , double z ) => new ( f . x , f . y , z , f . w ) ;
404404 /// substitutes the component w
405- [ MethodImpl ( IL ) ] public static double4 subw ( this double4 f , double w ) => new ( f . x , f . y , f . z , w ) ;
405+ [ MethodImpl ( IL ) ] public static double4 swapw ( this double4 f , double w ) => new ( f . x , f . y , f . z , w ) ;
406406 }
407407}
0 commit comments