Re: Power arithmetic function to C#
- From: "SunYour" <sunyour@xxxxxxxxxxx>
- Date: 31 Mar 2006 00:44:57 -0800
Maarten,
Thank you for your comments! Of course I should have used Floor and
extra parentheses, you're absolutely right.
Truncate is a member in the static Math class, but it is new in the
..net Framework 2.0.
Maybe you are using the 2003 studio?
Math.Truncate Method (Double)From MSDN
Calculates the integral part of a specified double-precision
floating-point number.
Parameters
d A number to truncate.
Return Value
The integral part of d; that is, the number that remains after any
fractional digits have been discarded.
Check the new "delphi to .net convert" feature in Math.Round, now with
MidPointRounding to be able to specify how mathematical rounding
methods should process a number that is midway between two numbers.
Really nice, new in Framework 2.0 as well
Enum "values":
AwayFromZero
- When a number is halfway between two others, it is rounded toward the
nearest number that is away from zero.
ToEven
- When a number is halfway between two others, it is rounded toward the
nearest even number.
Regards,
Magnus
.
- Follow-Ups:
- Re: Power arithmetic function to C#
- From: Maarten Wiltink
- Re: Power arithmetic function to C#
- References:
- Power arithmetic function to C#
- From: SunYour
- Re: Power arithmetic function to C#
- From: Tom de Neef
- Re: Power arithmetic function to C#
- From: Hanford Carr
- Re: Power arithmetic function to C#
- From: Maarten Wiltink
- Re: Power arithmetic function to C#
- From: SunYour
- Re: Power arithmetic function to C#
- From: Maarten Wiltink
- Power arithmetic function to C#
- Prev by Date: Info for component name.
- Next by Date: How to use ADO to insert data into Excel??
- Previous by thread: Re: Power arithmetic function to C#
- Next by thread: Re: Power arithmetic function to C#
- Index(es):
Relevant Pages
|