Instant properties: x2

The instant property x2 corresponds to the position of the bottom-right corner stored within a rect operand.

Declaration

int32 rect.x2

Discussion

The read access to this property returns the x coordinate of the bottom-right corner of a rect operand. The write access modifies the x coordinate of the bottom-right corner of a rect operand. Other components (x1, y1 and y2) are not affected by the modification. For example:

var rect r = <100,200,110,220>; // Read the x2 coordinate var int32 result = r.x2; // result = 110 // Modify the x2 coordinate r.x2 = 150; // r = <100,200,150,220>

Usage in Inspector

When working with Inspector you can easily access, evaluate and modify the x2 coordinate. For this purpose select in Inspector the desired rect property or attribute and click on the small triangle on its left side to expand and display the subordinated values: