System.Power10

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function Power10(val: Extended; power: Integer): Extended;

C++

extern DELPHI_PACKAGE Extended __fastcall Power10(Extended val, int power);

Properties

Type Visibility Source Unit Parent
function public
System.pas
System.hpp
System System

Description

Returns the value of given floating-point value scaled by a power of 10.

Power10(x, p) is equivalent to x*(10^p).

Example:

Writeln(FloatToStr(Power10(2.345, 2))); // displays 234.5

See Also