Yurttas/PL/IL/Ada-95/OO/GEO/geometry.adb
Jump to navigation
Jump to search
1with Ada.Numerics.Elementary_Functions;
2use Ada.Numerics.Elementary_Functions;
3
4package body Geometry is
5
6 function Distance(O : Object) return Float is
7 -- Returns distance of object from origin.
8 begin
9 return Sqrt(O.X_Coord**2 + O.Y_Coord**2);
10 end Distance;
11
12end Geometry;