=pod

=encoding utf8

=head1 NAME

AN::Tools::Tut::Math

This module provides access to the mathmatical methods.

=head1 SYNOPSIS

  use AN::Tut::Tools;

  # Get a common object handle on all AN::Tut::Tools::* modules.
  my $an=AN::Tut::Tools->new();

=head1 DESCRIPTION

This module provides methods for performing basic math.

=head1 NOTES

All AN::Tut::Tools::* modules expects the data they receive to be in UTF-8 encoded format. Likewise, they return UTF-8 encoded strings. If you are getting weird output or are seeing a "wide character in print" error, check that you are not getting double-encoded UTF-8 strings by casting your data as UTF-8 in the first place.

=head1 METHODS

Below are the detailed usage instructions for the methods provided by this module.

=head2 add

=head3 Example

  # Do a simple addition.
  my $num1=10;
  my $num2=12;
  my $result=$an->Math->add($num1, $num2);
  # $result is '22'.

=head3 Details

This method takes two numbers and returns the resulting addition of those two numbers. The numbers may be signed whole integers or floating points (real) numbers.

=head2 subtract

=head3 Example

  # Do a simple subtraction.
  # talk about.
  my $num1=10;
  my $num2=12;
  my $result=$an->Math->subtract($num1, $num2);
  # $result is '-2'.

=head3 Details

This method takes two numbers and returns the result of subtracting the second number from the first. The numbers may be signed whole integers or floating points (real) numbers.

=head2 add_and_say

=head3 Example

  # Do a simple addition, but get back the processed string in French.
  $an->Math->add_and_say(2, 18, "fr");
  # $result is 'J'ai additionné: [2] et: [18] et la somme est: [20].'.

=head3 Details

This method takes two numbers and returns a string in the specified language with the answer (English, if not specified).

=head1 SEE ALSO

Other modules in the AN::Tools suite:

=over

=item AN::Tut::Tools

=item AN::Tut::Tools::Say

=back

=head1 LICENSE

 Copyright (c) 2009 Alteeve's Niche!. All rights reserved.
 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

=cut

