"Для разработчиков", "Серверные скрипты", "Описание функций", "Математические", "Pi".
Получить значение числа Пи.
function Pi: extended;
Значение числа Пи.
const
iDiameter = 10; // 10 centimeters
begin
mLogScript('The diameter of the circle = ' + inttostr(iDiameter), '');
mLogScript('The area of the circle = ' + floattostr(Pi * iDiameter), '');
mLogScript('Circumference = ' + floattostr(Pi * (iDiameter / 2) * (iDiameter / 2)), '');
end.
[08:24:58] (Log "Pi"): The diameter of the circle = 10
[08:24:58] (Log "Pi"): The area of the circle = 31.415926535898
[08:24:58] (Log "Pi"): Circumference = 78.539816339745