WhiteUnicorn |
| |
#WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ > | |
|
How do I create a power function?
The following example shows how to use the example power function to raise three to the power of 2: function Power(x, y : extended) : extended; begin result := exp(y*ln(x)); end; procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage(FloatToStr(Power(3, 2))); end;
| |
#WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ > | |
|
| ||
Anastasija aka WhiteUnicorn |
LiveJournal PhotoFile |
|
|