real class : Truncate() method

Description

Gets an new instance of the real type that has a nearest integer value towards zero from the instance value.

Syntax

realInstance.Truncate()

Arguments

None

Return value

ClassDescription
realAn new instance of the real type that has a nearest integer value towards zero from the instance value.

Sample code

//anyReal is a instance of real type.

real newInstance = anyReal.Truncate();

Notes

It's a wrapper of the System.Math.Truncate(Double).

Links for reference

Copyright © Rice All rights reserved.