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.

Basics<br />

}<br />

public static Index2 NarrowToInterval (Index2 x, Index2 low,<br />

Index2 high) ;<br />

public static Index3 NarrowToInterval (Index3 x, Index3 low,<br />

Index3 high) ;<br />

public static T NarrowToInterval (T x, Range1 range) where<br />

T : IComparable, IEquatable ;<br />

public static T NarrowToInterval (T x, T low, T high) where<br />

T : IComparable, IEquatable ;<br />

public static int NearestMultiple (int m, int n) ;<br />

public static int NextMultiple (int m, int n);<br />

public static int PreviousMultiple (int m, int n);<br />

public static T SignInterval (T x, Range1 range) where<br />

T : IComparable, IEquatable ;<br />

public static T SignInterval (T x, T low, T high) where<br />

T : IComparable, IEquatable ;<br />

public static int SmallerMultiple (int m, int n) ;<br />

public static void Swap (ref T a, ref T b);<br />

The following section describes the available methods briefly.<br />

AlmostEqual – check if two numbers are almost equal.<br />

The four overloaded versions of this function are as follows:<br />

AlmostEqual(double x,double y);<br />

The formula: ||x|-|y||/(1 + (|x|+|y|)/2) less than System.Double.Epsilon.<br />

AlmostEqual(float x, float y);<br />

Formula: ||x|-|y||/(1 + (|x|+|y|)/2) less than System.Single.Epsilon.<br />

AlmostEqual(double x, double y, double eps);<br />

Formula: ||x|-|y||/(1 + (|x|+|y|)/2) less than eps.<br />

AlmostEqual(float x, float y, float eps);<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!