Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Math-Vector-Real
perl-Math-Vector-Real.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Math-Vector-Real.spec of Package perl-Math-Vector-Real
# # spec file for package perl-Math-Vector-Real # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-Math-Vector-Real Version: 0.18 Release: 0 %define cpan_name Math-Vector-Real Summary: Real vector arithmetic in Perl License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Math-Vector-Real/ Source0: https://cpan.metacpan.org/authors/id/S/SA/SALVA/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros %{perl_requires} %description A simple pure perl module to manipulate vectors of any dimension. The function 'V', always exported by the module, allows one to create new vectors: my $v = V(0, 1, 3, -1); Vectors are represented as blessed array references. It is allowed to manipulate the arrays directly as far as only real numbers are inserted (well, actually, integers are also allowed because from a mathematical point of view, integers are a subset of the real numbers). Example: my $v = V(0.0, 1.0); # extending the 2D vector to 3D: push @$v, 0.0; # setting some component value: $v->[0] = 23; Vectors can be used in mathematical expressions: my $u = V(3, 3, 0); $p = $u * $v; # dot product $f = 1.4 * $u + $v; # scalar product and vector addition $c = $u x $v; # cross product, only defined for 3D vectors # etc. The currently supported operations are: + * / - (both unary and binary) x (cross product for 3D vectors) += -= *= /= x= == != "" (stringfication) abs (returns the norm) atan2 (returns the angle between two vectors) That, AFAIK, are all the operations that can be applied to vectors. When an array reference is used in an operation involving a vector, it is automatically upgraded to a vector. For instance: my $v = V(1, 2); $v += [0, 2]; %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes examples README %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor