### ----------------------------------------------------
### -- Geo::Ellipsoid
### -- Licenses: Artistic-2.0
### -- Authors: Tom Browder <tbrowder@acm.org> (translator Perl 5 to Raku, current maintainer), Jim Gibson (CPAN Perl 5 author, v1.12)
### -- File: tt/09-bearing.t
### ----------------------------------------------------
### -- Chunk 1 of 5
#!/usr/local/bin/perl
# Test Geo::Ellipsoid bearing
use Test::More tests => 432;
use Test::Number::Delta relative => 1e-6;
use Geo::Ellipsoid;
use blib;
use strict;
use warnings;

my $e_pos = Geo::Ellipsoid->new(units=>'degrees');
my $e_sym = Geo::Ellipsoid->new(units=>'degrees',bearing=>1);
my($azp,$azs);

$azp = $e_pos->bearing(-88.000000,1.000000,-88.000000,90.000000);
delta_within( $azp, 134.482545961512, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,-88.000000,90.000000);
delta_within( $azs, 134.482545961512, 0.1 );

$azp = $e_pos->bearing(-88.000000,1.000000,-88.000000,179.000000);
delta_within( $azp, 178.999390582928, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,-88.000000,179.000000);
delta_within( $azs, 178.999390582928, 0.1 );

$azp = $e_pos->bearing(-88.000000,1.000000,-88.000000,268.000000);
delta_within( $azp, 223.517433140781, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,-88.000000,268.000000);
delta_within( $azs, -136.482566859219, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,0.000000,1.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(-88.000000,1.000000,0.000000,90.000000);
delta_within( $azp, 89.011158607559, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,0.000000,90.000000);
delta_within( $azs, 89.011158607559, 0.1 );

$azp = $e_pos->bearing(-88.000000,1.000000,0.000000,179.000000);
delta_within( $azp, 177.999150742584, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,0.000000,179.000000);
delta_within( $azs, 177.999150742584, 0.1 );

$azp = $e_pos->bearing(-88.000000,1.000000,0.000000,268.000000);
delta_within( $azp, 266.991287566797, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,0.000000,268.000000);
delta_within( $azs, -93.0087124332033, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,88.000000,1.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(-88.000000,1.000000,88.000000,90.000000);
delta_within( $azp, 44.5248574511054, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,88.000000,90.000000);
delta_within( $azs, 44.5248574511054, 0.1 );

$azp = $e_pos->bearing(-88.000000,1.000000,88.000000,179.000000);
delta_within( $azp, 89.011158607592, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,88.000000,179.000000);
delta_within( $azs, 89.011158607592, 0.1 );

$azp = $e_pos->bearing(-88.000000,1.000000,88.000000,268.000000);
delta_within( $azp, 313.474906296863, 0.1 );

$azs = $e_sym->bearing(-88.000000,1.000000,88.000000,268.000000);
delta_within( $azs, -46.5250937031367, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,-88.000000,1.000000);
delta_within( $azp, 225.517454038488, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,-88.000000,1.000000);
delta_within( $azs, -134.482545961512, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,-88.000000,179.000000);
delta_within( $azp, 134.482545961512, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,-88.000000,179.000000);
delta_within( $azs, 134.482545961512, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,-88.000000,268.000000);
delta_within( $azp, 178.999390582928, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,-88.000000,268.000000);
delta_within( $azs, 178.999390582928, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,0.000000,1.000000);
delta_within( $azp, 270.988841392441, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,0.000000,1.000000);
delta_within( $azs, -89.011158607559, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,0.000000,90.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,0.000000,179.000000);
delta_within( $azp, 89.011158607559, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,0.000000,179.000000);
delta_within( $azs, 89.011158607559, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,0.000000,268.000000);
delta_within( $azp, 177.999150742584, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,0.000000,268.000000);
delta_within( $azs, 177.999150742584, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,88.000000,1.000000);
delta_within( $azp, 315.475142548895, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,88.000000,1.000000);
delta_within( $azs, -44.5248574511054, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,88.000000,90.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,88.000000,179.000000);
delta_within( $azp, 44.5248574511054, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,88.000000,179.000000);
delta_within( $azs, 44.5248574511054, 0.1 );

$azp = $e_pos->bearing(-88.000000,90.000000,88.000000,268.000000);
delta_within( $azp, 89.011158607592, 0.1 );

$azs = $e_sym->bearing(-88.000000,90.000000,88.000000,268.000000);
delta_within( $azs, 89.011158607592, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,-88.000000,1.000000);
delta_within( $azp, 181.000609417072, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,-88.000000,1.000000);
delta_within( $azs, -178.999390582928, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,-88.000000,90.000000);
delta_within( $azp, 225.517454038488, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,-88.000000,90.000000);
delta_within( $azs, -134.482545961512, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,-88.000000,268.000000);
delta_within( $azp, 134.482545961512, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,-88.000000,268.000000);
delta_within( $azs, 134.482545961512, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,0.000000,1.000000);
delta_within( $azp, 182.000849257416, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,0.000000,1.000000);
delta_within( $azs, -177.999150742584, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,0.000000,90.000000);
delta_within( $azp, 270.988841392441, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,0.000000,90.000000);
delta_within( $azs, -89.011158607559, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,0.000000,179.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,0.000000,268.000000);
delta_within( $azp, 89.011158607559, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,0.000000,268.000000);
delta_within( $azs, 89.011158607559, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,88.000000,1.000000);
delta_within( $azp, 270.988841392408, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,88.000000,1.000000);
delta_within( $azs, -89.011158607592, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,88.000000,90.000000);
delta_within( $azp, 315.475142548895, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,88.000000,90.000000);
delta_within( $azs, -44.5248574511054, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,88.000000,179.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(-88.000000,179.000000,88.000000,268.000000);
delta_within( $azp, 44.5248574511054, 0.1 );

$azs = $e_sym->bearing(-88.000000,179.000000,88.000000,268.000000);
delta_within( $azs, 44.5248574511054, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,-88.000000,1.000000);
delta_within( $azp, 136.482566859219, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,-88.000000,1.000000);
delta_within( $azs, 136.482566859219, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,-88.000000,90.000000);
delta_within( $azp, 181.000609417072, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,-88.000000,90.000000);
delta_within( $azs, -178.999390582928, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,-88.000000,179.000000);
delta_within( $azp, 225.517454038488, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,-88.000000,179.000000);
delta_within( $azs, -134.482545961512, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,0.000000,1.000000);
delta_within( $azp, 93.0087124332033, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,0.000000,1.000000);
delta_within( $azs, 93.0087124332033, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,0.000000,90.000000);
delta_within( $azp, 182.000849257416, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,0.000000,90.000000);
delta_within( $azs, -177.999150742584, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,0.000000,179.000000);
delta_within( $azp, 270.988841392441, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,0.000000,179.000000);
delta_within( $azs, -89.011158607559, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,0.000000,268.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,88.000000,1.000000);
delta_within( $azp, 46.5250937031367, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,88.000000,1.000000);
delta_within( $azs, 46.5250937031367, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,88.000000,90.000000);
delta_within( $azp, 270.988841392408, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,88.000000,90.000000);
delta_within( $azs, -89.011158607592, 0.1 );

$azp = $e_pos->bearing(-88.000000,268.000000,88.000000,179.000000);
delta_within( $azp, 315.475142548895, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,88.000000,179.000000);
delta_within( $azs, -44.5248574511054, 0.1 );

$azs = $e_sym->bearing(-88.000000,268.000000,88.000000,268.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,-88.000000,1.000000);
delta_within( $azp, 180, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,-88.000000,90.000000);
delta_within( $azp, 177.99357628514, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,-88.000000,90.000000);
delta_within( $azs, 177.99357628514, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,-88.000000,179.000000);
delta_within( $azp, 179.929950967799, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,-88.000000,268.000000);
delta_within( $azp, 182.003955421895, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,-88.000000,268.000000);
delta_within( $azs, -177.996044578105, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,0.000000,90.000000);
delta_within( $azp, 90, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,0.000000,90.000000);
delta_within( $azs, 90, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,0.000000,179.000000);
delta_within( $azp, 90, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,0.000000,179.000000);
delta_within( $azs, 90, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,0.000000,268.000000);
delta_within( $azp, 270, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,0.000000,268.000000);
delta_within( $azs, -90, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,88.000000,1.000000);
delta_within( $azs, 0, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,88.000000,90.000000);
delta_within( $azp, 2.00642371485969, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,88.000000,90.000000);
delta_within( $azs, 2.00642371485969, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,88.000000,179.000000);
delta_within( $azs, 0.0700490322014982, 0.1 );

$azp = $e_pos->bearing(0.000000,1.000000,88.000000,268.000000);
delta_within( $azp, 357.996044578105, 0.1 );

$azs = $e_sym->bearing(0.000000,1.000000,88.000000,268.000000);
delta_within( $azs, -2.0039554218951, 0.1 );

$azp = $e_pos->bearing(0.000000,90.000000,-88.000000,1.000000);
delta_within( $azp, 182.00642371486, 0.1 );

$azs = $e_sym->bearing(0.000000,90.000000,-88.000000,1.000000);
delta_within( $azs, -177.99357628514, 0.1 );

$azp = $e_pos->bearing(0.000000,90.000000,-88.000000,90.000000);
delta_within( $azp, 180, 0.1 );

$azp = $e_pos->bearing(0.000000,90.000000,-88.000000,179.000000);
delta_within( $azp, 177.99357628514, 0.1 );

$azs = $e_sym->bearing(0.000000,90.000000,-88.000000,179.000000);
delta_within( $azs, 177.99357628514, 0.1 );

$azp = $e_pos->bearing(0.000000,90.000000,-88.000000,268.000000);
delta_within( $azp