Skip to Main Content
C# in a Nutshell, Second Edition
book

C# in a Nutshell, Second Edition

by Peter Drayton, Ben Albahari, Ted Neward
August 2003
Intermediate to advanced content levelIntermediate to advanced
928 pages
32h 1m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell, Second Edition

Name

Math

Synopsis

This class provides static helper functions for many trigonometric, logarithmic, and other mathematical operations, including methods for rounding numbers, getting absolute values, retrieving the largest whole divisor (Floor( )), and determining the remainder (IEEERemainder( )). The constants pi and e are provided as fields.

public sealed class Math {
// Public Static Fields
   public const double E; 
// =2.71828182845905
   public const double PI;
// =3.14159265358979
                  // Public Static Methods
   public static decimal Abs(decimal value);
   public static double Abs(double value);
   public static short Abs(short value);
   public static int Abs(int value);
   public static long Abs(long value);
   public static sbyte Abs(sbyte value);
   public static float Abs(float value);
   public static double Acos(double d);
   public static double Asin(double d);
   public static double Atan(double d);
   public static double Atan2(double y, double x);
   public static long BigMul(int a, int b);
   public static double Ceiling(double a);
   public static double Cos(double d);
   public static double Cosh(double value);
   public static int DivRem(int a, int b, out int result);
   public static long DivRem(long a, long b, out long result);
   public static double Exp(double d);
   public static double Floor(double d);
   public static double IEEERemainder(double x, double y);
   public static double Log(double d);
   public static double Log(double a, double newBase);
   public static double Log10(double d);
   public static byte Max(byte val1, byte ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# in a Nutshell

C# in a Nutshell

Ben Albahari, Ted Neward, Peter Drayton
C# 7.0 in a Nutshell

C# 7.0 in a Nutshell

Joseph Albahari, Ben Albahari
C# Cookbook, 2nd Edition

C# Cookbook, 2nd Edition

Jay Hilyard, Stephen Teilhet
C# Cookbook

C# Cookbook

Stephen Teilhet, Jay Hilyard

Publisher Resources

ISBN: 0596005261Catalog PageErrata