Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 19, 2024 via composer

markbaker/complex 3.0.2

PHP Class for working with complex numbers
Package summary
Share
0
issues
1
license
1
MIT
Package created
16 Jan 2015
Version published
6 Dec 2022
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
markbaker/complex@3.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of markbaker/complex 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does markbaker/complex do?

MarkBaker/Complex is a versatile PHP library designed to simplify operations with complex numbers, making it an invaluable tool for developers working on mathematical or scientific projects. The package provides various operations such as addition, subtraction, multiplication, and division, along with a range of functions including but not limited to theta, rho, and conjugate. It also offers advanced mathematical functions like cosine, inverse cosine, hyperbolic cosine, and more. The capability to work with advanced mathematical functions is a major growth factor for this PHP library's popularity.

How do you use markbaker/complex?

To use the MarkBaker/Complex package, you need to first install it via Composer by running composer require markbaker/complex:^1.0 in the shell. The library exposes an easy-to-use API for handling complex number operations. To create a new complex object, you need to supply the real, imaginary, and suffix parts as individual values, an array, or as a complex number string to the Complex class. For instance,

$real = 1.23;
$imaginary = -4.56;
$suffix = 'i';

$complexObject = new Complex\Complex($real, $imaginary, $suffix);

or as an array

$real = 1.23;
$imaginary = -4.56;
$suffix = 'i';

$arguments = [$real, $imaginary, $suffix];

$complexObject = new Complex\Complex($arguments);

After creating a complex number, you can perform mathematical operations such as addition or multiplication, using methods like add() or multiply().

$complexString1 = '1.23-4.56i';
$complexString2 = '2.34+5.67i';

$complexObject = new Complex\Complex($complexString1);
echo $complexObject->add($complexString2); 

Note that complex objects are immutable, meaning that every operation returns a new complex object while the original remains unchanged.

Where are the markbaker/complex docs?

Unfortunately, according to the readme content provided, there doesn't appear to be a dedicated documentation for the MarkBaker/Complex package outside of the readme or source code comments within the library itself. If more detailed documentation is essential for your needs, you may want to explore the source code comments, the GitHub repository's Issues section, or potentially reach out to the developers directly on GitHub.