Skip to content

Commit

Permalink
Merge pull request #17 from keijiro/fix-step
Browse files Browse the repository at this point in the history
Fix argument order of step function
  • Loading branch information
xoofx committed May 25, 2018
2 parents b725e19 + b4c3863 commit 45e2b2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Unity.Mathematics/math.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ public static float4 smoothstep(float4 a, float4 b, float4 x)

//Step
[MethodImpl((MethodImplOptions)0x100)] // agressive inline
public static float step(float a, float b) { return select(0.0f, 1.0f, a >= b); }
public static float step(float a, float b) { return select(0.0f, 1.0f, b >= a); }
[MethodImpl((MethodImplOptions)0x100)] // agressive inline
public static float2 step(float2 a, float2 b) { return select(0.0f, 1.0f, a >= b); }
public static float2 step(float2 a, float2 b) { return select(0.0f, 1.0f, b >= a); }
[MethodImpl((MethodImplOptions)0x100)] // agressive inline
public static float3 step(float3 a, float3 b) { return select(0.0f, 1.0f, a >= b); }
public static float3 step(float3 a, float3 b) { return select(0.0f, 1.0f, b >= a); }
[MethodImpl((MethodImplOptions)0x100)] // agressive inline
public static float4 step(float4 a, float4 b) { return select(0.0f, 1.0f, a >= b); }
public static float4 step(float4 a, float4 b) { return select(0.0f, 1.0f, b >= a); }

[MethodImpl((MethodImplOptions)0x100)] // agressive inline
public static float reflect(float i, float n) { return i - 2f * n * dot(i, n); }
Expand Down

0 comments on commit 45e2b2a

Please sign in to comment.