The x
property represents the X component of a Vector4
structure. It is a single-precision floating-point value that defines the horizontal component of the vector in a 4-dimensional space.
The x
property represents the X component of a Vector4
structure. It is a single-precision floating-point value that defines the horizontal component of the vector in a 4-dimensional space.
To access or modify the X component of a Vector4
instance, use the x
property. This property is read-write, allowing you to both retrieve and set the value.
// Example of using the x property // Create a new Vector4 instance Vector4 vector = new Vector4(); // Set the x component vector.x = 5.0f; // Retrieve the x component float xValue = vector.x; // Output the x component // Note: Use a logging method instead of Console.WriteLine in Sandbox Log.Info($"The X component is: {xValue}");