Skip to content

Instantly share code, notes, and snippets.

@LastOfTheCarelessMen
Created August 26, 2009 02:19
use v6;
use Vector;
use Test;
sub is_approx_vector(Vector $a, Vector $b, $desc)
{
ok(($a V- $b).Length < 0.00001, $desc);
}
plan *;
my $v1 = Vector.new(1, 2, 3);
my Vector $v2 = Vector.new(3, 4, 0);
my @v3 = (-1, 0, 2);
my Vector $v3 = Vector.new(@v3);
my Vector $origin3d = Vector.new(0, 0, 0);
my Vector $v5 = Vector.new(1,2,3,4,5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment