ProtoFlux:Random Point In Square: Difference between revisions

From Resonite Wiki
Created a page for the Random Point In Square node.
 
touchup
Line 1: Line 1:
{{#Invoke:ProtoFlux|GenerateUI
{{#Invoke:ProtoFlux|GenerateUI
|Name=Random Point In Square
|Name=Random Point In Square
Line 9: Line 8:
|}}
|}}


The '''Random Point In Square''' node returns a random [[Type:float2|float2]] value of a point in a [https://en.wikipedia.org/wiki/Unit_square unit square], the X and Y will be in between <code>-1</code> and <code>1</code> (exclusive).
The '''Random Point In Square''' node returns a random [[Type:float2|float2]] value of a point within the bounds of a [https://en.wikipedia.org/wiki/Unit_square unit square] centered at <code>[0; 0]</code>.


{{Note|This node constantly changes its value every frame, if you want to use this value, make sure to either [[ProtoFlux:Write|Write]] to a [[ProtoFlux:Data Model Store|Variable]] or use it within that frame.|warning}}
{{ProtoFluxRandomNodeWarning}}


== Outputs ==
== Outputs ==
Line 17: Line 16:
=== * ([[Type:float2|float2]]) ===
=== * ([[Type:float2|float2]]) ===


The random result.
A random point within the unit square centered at <code>[0; 0]</code>.


[[Category:ProtoFlux:Math:Random:Point]]
[[Category:ProtoFlux:Math:Random:Point]]

Revision as of 19:29, 15 April 2025

Random Point In Square
*
Point

The Random Point In Square node returns a random float2 value of a point within the bounds of a unit square centered at [0; 0].

This node is a random node. Random nodes generate a new output every time they are accessed during an impulse chain, even if during the same frame. To reuse the same value for multiple impulse nodes, you must write the value to a Local, Store, or Data Model Store before operating on it.

Outputs

* (float2)

A random point within the unit square centered at [0; 0].