Main > Programming > Libraries >

Math::Zap::Triangle2 1.07

Math::Zap::Triangle2 1.07

Sponsored Links

Math::Zap::Triangle2 1.07 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.062 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 804
Date added: 2007-08-11
Publisher: Philip R. Brenan

Math::Zap::Triangle2 1.07 description

Math::Zap::Triangle2 - triangles in 2D space.

Synopsis

Example t/triangle2.t
#_ Triangle ___________________________________________________________
# Test 2d triangles
# philiprbrenan@yahoo.com, 2004, Perl License
#______________________________________________________________________

use Math::Zap::Triangle2;
use Math::Zap::Vector2;
use Test::Simple tests=>27;

$a = triangle2
(vector2(0, 0),
vector2(2, 0),
vector2(0, 2),
);

$b = triangle2
(vector2( 0, 0),
vector2( 4, 0),
vector2( 0, 4),
);

$c = triangle2
(vector2( 0, 0),
vector2(-4, 0),
vector2( 0, -4),
);

$d = $b - vector2(1,1);
$e = $c + vector2(1,1);

#print "a=$anb=$bnc=$cnd=$dne=$en";

ok($a->containsPoint(vector2( 1, 1)));
ok($a->containsPoint(vector2( 1, 1)));
ok($b->containsPoint(vector2( 2, 0)));
ok($b->containsPoint(vector2( 1, 0)));
ok($c->containsPoint(vector2(-1, 0)));
ok($c->containsPoint(vector2(-2, 0)));
ok($d->containsPoint(vector2( 1, -1)));

ok(!$a->containsPoint(vector2( 9, 1)));
ok(!$a->containsPoint(vector2( 1, 9)));
ok(!$b->containsPoint(vector2( 2, 9)));
ok(!$b->containsPoint(vector2( 9, 0)));
ok(!$c->containsPoint(vector2(-9, 0)));
ok(!$c->containsPoint(vector2(-2, 9)));
ok(!$d->containsPoint(vector2( 9, -1)));

ok( $a->containsPoint(vector2(0.5, 0.5)));
ok(!$a->containsPoint(vector2( -1, -1)));

ok(vector2(1,2)->rightAngle == vector2(-2, 1));
ok(vector2(1,0)->rightAngle == vector2( 0, 1));

ok($a->area == 2);
ok($c->area == 8);

eval { triangle2(vector2(0, 0), vector2(3, -6), vector2(-3, 6))};
ok($@ =~ /^Narrow triangle2/, Narrow triangle);

$t = triangle2(vector2(0,0),vector2(0,10),vector2( 10,0));
$T = triangle2(vector2(0,0),vector2(0,10),vector2(-10,10))+vector2(5, -2);
@p = $t->ring($T);
#print "$_n" for(@p);
ok($p[0] == vector2(0, 8), Ring 0);
ok($p[1] == vector2(2, 8), Ring 1);
ok($p[2] == vector2(5, 5), Ring 2);
ok($p[3] == vector2(5, 0), Ring 3);
ok($p[4] == vector2(3, 0), Ring 4);
ok($p[5] == vector2(0, 3), Ring 5);

Math::Zap::Triangle2 1.07 Screenshot

Advertisements

Math::Zap::Triangle2 1.07 Keywords

Bookmark Math::Zap::Triangle2 1.07

Hyperlink code:
Link for forum:

Math::Zap::Triangle2 1.07 Copyright

WareSeeker periodically updates pricing and software information of Math::Zap::Triangle2 1.07 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Math::Zap::Triangle2 1.07 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Math::Zap::Triangle module can build triangles in 3D space. Free Download
Math::Zap::Rectangle is a Perl module that generates rectangles in 3d space. Free Download
Math::Zap::Matrix2 is a Perl module for 2*2 matrix manipulation. Free Download
Math::Zap::Matrix is a Perl module for 3*3 matrix manipulation. Free Download
Math::String module contains arbitrary sized integers having arbitrary charsets to calculate with key rooms. Free Download
Math::Roman contains arbitrary sized Roman numbers and conversion from and to Arabic. Free Download
Tomato is a small, lean, simple replacement firmware for certain Linksys and Buffalo wireless routers. Free Download
PMathGen project is a simple math problem generator that outputs LaTeX and optionally PostScript. Free Download