-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.ComputeSharp.Core.Classes
github-actions[bot] edited this page Jul 15, 2026
·
2 revisions
Represents a boolean value stored as an integer, typically used for compatibility with compute shaders or GPU buffers.
public readonly struct BoolInitializes a new instance of the Bool struct using a standard boolean value.
public Bool(bool value);value System.Boolean
The boolean value to convert.
Initializes a new instance of the Bool struct using an integer value.
public Bool(int value);value System.Int32
The integer value to convert (1 is treated as true, all other values are false).
The underlying integer representation of the boolean value, where 0 is false and 1 is true.
public readonly int Value;Converts the internal integer representation back to a standard C# boolean.
public bool ToBool();System.Boolean
True if the internal value is 1; otherwise, false.
Returns a string representation of the boolean value.
public override string ToString();System.String
The string "True" or "False".