Home  |  Delphi .net Home  |  System.Math  |  Sqrt Method
Sqrt  
Method  
Gives the square root of a number
Math Class
System NameSpace
CF1.  Function Sqrt ( Value : Double; ) : Double; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
Returns the square root of Value
Notes
Static methods are not methods of an object - they are simply class functions or procedures available at any time.
Microsoft MSDN Links
System
System.Math
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  float : Double;
begin
  float := System.Math.Sqrt(16);
  Console.WriteLine('Sqrt(16) = {0}', float.ToString);

  Console.ReadLine;
end.
Show full unit code
  Sqrt(16) = 4
 
 
Delphi Programming © Neil Moffatt All rights reserved.  |  Contact the author