NAME

Video::Delay::Func - Video::Delay class for delays defined by math function.

SYNOPSIS

use Video::Delay::Func;
my $obj = Video::Delay::Func->new(%parameters);
my $delay = $obj->delay;

METHODS

new(%parameters)
Constructor
  • func

    Math function. 't' is time variable.
    Default value is '1000 * sin(t)'.
  • incr

    Counter increment.
    Default value is 0.1.
delay()
Returns delay defined by function in miliseconds.
Time si affected by 'incr' increment parameter.

ERRORS

new():
        From Class::Utils::set_params():
                Unknown parameter '%s'.

delay():
        Error in function
                Error, %s

EXAMPLE

# Pragmas.
use strict;
use warnings;

# Modules.
use Video::Delay::Func;

# Object.
my $obj = Video::Delay::Func->new(
        'func' => '1000 * sin(t)',
        'incr' => 0.1,
);

# Print delay.
print $obj->delay."\n";
print $obj->delay."\n";
print $obj->delay."\n";

# Output:
# 99.8334166468282
# 198.669330795061
# 295.52020666134

DEPENDENCIES

Class::Utils, English, Error::Pure.

SEE ALSO

Video::Delay::Array, Video::Delay::Const.

REPOSITORY

https://github.com/tupinek/Video-Delay

AUTHOR

Michal Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

BSD 2-Clause License

VERSION

0.01