02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Geometry<br />

+ Operator – This operation adds two vectors. The result vector is reached by adding the<br />

X, Y, and Z properties of the second vector to the same property 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 = (30, 50, 70)<br />

* Operator - This operation controls the multiplication of a vector by a scalar. It returns the<br />

vector resulting from the multiplication of each of the X, Y, and Z properties of the given<br />

vector by the given scalar.<br />

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

Vector3 vt3 = vt1 * 2.0;<br />

//vt3 = (20, 40, 60)<br />

* Operator - This operation controls the multiplication of a scalar by a vector. It returns<br />

the vector resulting from the multiplication of each of the X, Y, and Z properties of the<br />

given vector by the given scalar.<br />

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

Vector3 vt3 = 2.0 * vt1;<br />

//vt3 = (20,40,60)<br />

/ Operator - This operation controls the division of a vector by a scalar. It returns the<br />

vector resulting from division of each of the X, Y, and Z properties of the given vector by<br />

the given scalar.<br />

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

Vector3 vt3 = vt1 / 2;<br />

//vt3 = (5,10,15)<br />

== Operator - This operation compares two vector objects for equality. Returns true if<br />

the instances are equal. The objects are defined as equal if each of the X, Y, and Z<br />

properties of one matches the same property of the other.<br />

• • • • • •<br />

Note:<br />

Comparing Vector3.Null to any other instance will return false. This is to<br />

maintain consistency with the behavior of the floating point NaN comparison.<br />

4-146 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

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

Saved successfully!

Ooh no, something went wrong!