agpl_1.0.0_b5da3320/src/tests/t002_sigdist.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
with Agpl.Cv; use Agpl.Cv;
with Agpl.Strings; use Agpl.Strings;

with Text_Io; use Text_Io;
with Ada.Exceptions; use Ada.Exceptions;
with Ada.Numerics; use Ada.Numerics;

procedure T002_Sigdist is
begin
   Put_Line ("Dist: " & To_String
               (Signed_Distance
                  ((0.0, 0.0, 1.0) ** (1.0, 0.0, 1.0),
                   (2.0, 0.0, 1.0))));
   Put_Line ("Dist: " & To_String
               (Signed_Distance
                  ((0.0, 0.0, 1.0) ** (1.0, 0.0, 1.0),
                   (2.0, 1.0, 1.0))));
   Put_Line ("Dist: " & To_String
               (Signed_Distance
                  ((0.0, 0.0, 1.0) ** (1.0, 0.0, 1.0),
                   (2.0, - 1.0, 1.0))));

   Put_Line ("Dist: " & To_String
               (Signed_Distance
                  ((0.0, 0.0, 1.0) ** (-1.0, -1.0, 1.0),
                   (0.0, -1.0, 1.0))));
exception
   when E : others =>
      Put_Line ("Exception: " & Exception_Information (E));
end T002_Sigdist;