function d2xy_test ( )

%*****************************************************************************80
%
%% d2xy_test() tests d2xy().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 January 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'd2xy_test():\n' );
  fprintf ( 1, '  d2xy() converts a Hilbert linear D coordinate to an (X,Y) 2D coordinate.\n' );

  m = 3;
  n = 2 ^ m;

  fprintf ( 1, '\n' );
  fprintf ( 1, '    D    X    Y\n' );
  fprintf ( 1, '\n' );

  for d = 0 : n * n - 1
    [ x, y ] = d2xy ( m, d );
    fprintf ( 1, '  %3d  %3d  %3d\n', d, x, y );
  end

  return
end
