Skip to content

Commit

Permalink
Update RandomFloatQ.cs
Browse files Browse the repository at this point in the history
Fixed Invalid Q values
  • Loading branch information
Xlinka committed Jul 21, 2024
1 parent efe7808 commit 2c9cb80
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ProjectObsidian/ProtoFlux/Math/Random/RandomFloatQ.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
using ProtoFlux.Runtimes.Execution;
using Obsidian;


namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Math.Random
{

[NodeCategory("Obsidian/Math/Random")]
[ContinuouslyChanging]
public class RandomFloatQ : ValueFunctionNode<ExecutionContext, floatQ>
Expand All @@ -19,7 +17,10 @@ protected override floatQ Compute(ExecutionContext context)
floatQ min = Min.Evaluate(context);
floatQ max = Max.Evaluate(context);

return RandomXExtensions.Range(min, max);
floatQ randomQuat = RandomXExtensions.Range(min, max);
randomQuat = randomQuat.Normalized;

return randomQuat;
}
}
}

0 comments on commit 2c9cb80

Please sign in to comment.