02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Geometry<br />

MaxValue - This method returns a Vector object with the maximum double value for<br />

its X, Y, and Z properties.<br />

Vector3.MaxValue = (1.79769313486232E+308, 1.79769313486232E+308,<br />

1.79769313486232E+308)<br />

MinValue – This method returns a Vector object with the minimum double value for<br />

its X, Y, and Z properties.<br />

Vector3.MinValue = (-1.79769313486232E+308, -1.79769313486232E+308, -<br />

1.79769313486232E+308)<br />

Null - The undefined vector has components that are all undefined.<br />

Vector3.Null = (NaN,NaN,NaN)<br />

Zero - The null vector has components that are all 0.<br />

Vector3.Zero = (0, 0, 0)<br />

The Vector2 and Vector3 classes provide the following public operators:<br />

- (minus) Operator - This operation returns the vector with the opposite direction. This<br />

effectively multiplies the vectors X, Y, and Z properties by -1.<br />

Vector3 vt1 = new Vector3(10, 20, 30);<br />

Vector3 vt3 = -vt1;<br />

// vt3 = (-10, -20, -30)<br />

- (minus) Operator – This operation subtracts one vector from another. This is done by<br />

subtracting the X, Y, and Z properties of the second vector from those of the first vector.<br />

Vector3 vt1 = new Vector3(10, 20, 30);<br />

Vector3 vt2 = new Vector3(20, 30, 40);<br />

Vector3 vt3 = vt1 – vt2;<br />

// vt3 = (-10, -20, -30)<br />

+ Operator – This operation adds a vector. The result returns the same vector.<br />

Vector3 vt1 = new Vector3(10, 20, 30);<br />

Vector3 vt3 = +vt1;<br />

// vt3 = (10,20,30)<br />

<strong>Schlumberger</strong> Private<br />

<strong>Ocean</strong> Services 4-145

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!