Acme-MITHALDU-XSGrabBag

 view release on metacpan or  search on metacpan

lib/Acme/MITHALDU/XSGrabBag.pm  view on Meta::CPAN

...
}


sub _deg2rad {
    <<'...';
float deg2rad(float degrees) {
    return 0.0174532925 * degrees;
}
...
}


sub _rad2deg {
    <<'...';
float rad2deg(float radians) {
    return 57.2957795786 * radians;
}
...
}


sub _dot2_product {
    <<'...';
int dot2_product( int xa, int ya, int xb, int yb ) {
    int sum = 0;
    sum += xa * xb;
    sum += ya * yb;
    return sum;
}
...
}

1;

__END__

=pod

=head1 NAME

Acme::MITHALDU::XSGrabBag - a bunch of XS math functions i'm not sure where to shove yet

=head1 VERSION

version 1.161310

=head1 DESCRIPTION

This module is an experimental space for me to work with XS functions meant for
L<Microidium|https://github.com/wchristian/Microidium>.

=head1 FUNCTIONS

=head2 my $hash = mix( $a, $b, $c )

Takes 3 x 32 bits of data as integers, mixes them, combining all 96 bits of
input to generate a pseudo-random hash returned as a 32 bit integer.

Original implementation by
L<Bob Jenkins|http://web.archive.org/web/20071224045401/http://www.burtleburtle.net/bob/c/lookup2.c>.

=head2 my $deg = deg2rad( $rad )

32 bit degree to radian conversion, dirty, but fast.

=head2 my $rad = rad2deg( $deg )

32 bit radian to degree conversion, dirty, but fast.

=head2 my $dot = dot2_product( $xa, $ya, $xb, $yb )

Simple dot product calculation for 2d vectors.

=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan

=head1 SUPPORT

=head2 Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker
at L<http://rt.cpan.org/Public/Dist/Display.html?Name=Acme-MITHALDU-XSGrabBag>.
You will be notified automatically of any progress on your issue.

=head2 Source Code

This is open source software.  The code repository is available for
public review and contribution under the terms of the license.

L<https://github.com/wchristian/Acme-MITHALDU-XSGrabBag>

  git clone https://github.com/wchristian/Acme-MITHALDU-XSGrabBag.git

=head1 AUTHOR

Christian Walde <walde.christian@gmail.com>

=head1 COPYRIGHT AND LICENSE


Christian Walde has dedicated the work to the Commons by waiving all of his
or her rights to the work worldwide under copyright law and all related or
neighboring legal rights he or she had in the work, to the extent allowable by
law.

Works under CC0 do not require attribution. When citing the work, you should
not imply endorsement by the author.

=cut



( run in 2.575 seconds using v1.01-cache-2.11-cpan-a49fcb8fa48 )