System::Decimal::Round‑metod
Innehåll
[
Dölj
]Decimal::Round(const Decimal&, int, MidpointRounding) method
Avrundar det angivna värdet till närmaste värde med det angivna antalet decimaler. En parameter anger funktionens beteende om det angivna värdet är lika nära två närmaste tal.
static Decimal System::Decimal::Round(const Decimal &d, int digits, MidpointRounding mode=MidpointRounding::ToEven)
| Parameter | Type | Beskrivning |
|---|---|---|
| d | const Decimal& | Värdet att avrunda |
| decimaler | int | Antalet decimaler i det avrundade värdet |
| mode | MidpointRounding | Anger hur avrundningen ska utföras om value är lika nära två närmaste tal. |
ReturnValue
Numret med det angivna antalet siffror närmast value
Se även
- Class Decimal
- Enum MidpointRounding
- Class Decimal
- Namespace System
- Library Aspose.Page for C++
Decimal::Round(const Decimal&, MidpointRounding) method
Avrundar det angivna värdet till närmaste heltal. En parameter anger funktionens beteende om det angivna värdet är lika nära två närmaste tal.
static Decimal System::Decimal::Round(const Decimal &d, MidpointRounding mode=MidpointRounding::ToEven)
| Parameter | Type | Beskrivning |
|---|---|---|
| d | const Decimal& | Värdet att avrunda |
| mode | MidpointRounding | Anger hur avrundningen ska utföras om value är lika nära två närmaste tal. |
ReturnValue
d rounded to the nearest integral value
Se även
- Class Decimal
- Enum MidpointRounding
- Class Decimal
- Namespace System
- Library Aspose.Page for C++