Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 6772755

Browse files
committed
Big refactor of the README file
1 parent bef7bc0 commit 6772755

File tree

1 file changed

+13
-81
lines changed

1 file changed

+13
-81
lines changed

README.md

Lines changed: 13 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ php-bignumbers [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://git
22
==============
33

44
A robust library to handle immutable big numbers inside PHP applications
5-
The current stable version is 0.7.0.
5+
The current stable version is 0.7.0. Litipk\BigNumbers supports PHP 5.3.x, 5.4.x, 5.5.x, and 5.6.,x
6+
but also Facebook's [HHVM](http://www.hhvm.com).
67

78

89
Status Label | Status Value
@@ -15,12 +16,7 @@ Code Quality (Scrutinizer): | [![Scrutinizer Quality Score](https://scrutinizer-
1516
Code Quality (SensioLabs): | [![SensioLabsInsight](https://insight.sensiolabs.com/projects/9a279fbe-2b37-4612-abc0-027a3ad5d69c/mini.png)](https://insight.sensiolabs.com/projects/9a279fbe-2b37-4612-abc0-027a3ad5d69c)
1617
Dependencies: | [![Dependency Status](https://www.versioneye.com/user/projects/52cc91c6ec13754970000275/badge.png)](https://www.versioneye.com/user/projects/52cc91c6ec13754970000275)
1718

18-
## Requirements
19-
20-
Litipk PHP BigNumbers supports PHP 5.3.x, 5.4.x, 5.5.x, and 5.6.,x
21-
but also Facebook's [HHVM](http://www.hhvm.com).
22-
23-
## Install Instructions
19+
## Getting started
2420

2521
You can install this library using [Composer](http://getcomposer.org/).
2622

@@ -35,82 +31,18 @@ composer.json file the following text:
3531
}
3632
```
3733

38-
## Basic Usage
39-
40-
```php
41-
<?php
42-
43-
use \Litipk\BigNumbers\Decimal as Decimal;
44-
45-
/**
46-
* There are many ways to create Decimal objects.
47-
*
48-
* We can use the following methods:
49-
*
50-
* Decimal::fromInteger
51-
* Decimal::fromFloat
52-
* Decimal::fromString
53-
* Decimal::fromDecimal
54-
*
55-
* Decimal::create // this method works as methods fromType, but is more flexible
56-
*/
57-
58-
$ten = Decimal::fromInteger(10);
59-
$two = Decimal::fromString('2.0');
34+
## Learn more
6035

61-
/**
62-
* At this moment there are few binary operators
63-
* that we can use with Decimal objects:
64-
*
65-
* $d1->add($d2);
66-
* $d1->sub($d2);
67-
* $d1->mul($d2);
68-
* $d1->div($d2);
69-
*/
36+
* [Project Documentation](https://github.com/Litipk/php-bignumbers/wiki) : Here you can find how to use Litipk\BigNumbers in your applications.
37+
* [Chat Room](https://gitter.im/Litipk/php-bignumbers) : If you want to have a real-time chat with other Litipk\BigNumbers users or developers, you can do it here.
38+
* [Group / Mail List](https://groups.io/org/groupsio/php-bignumbers) : If a chat room isn't enough to post your doubts or ideas, you can join to our mail list.
7039

71-
$twenty = $ten->mul($two);
72-
$forty = $two->mul(Decimal::fromFloat(20.));
40+
## How to contribute
7341

74-
/**
75-
* There are many unary operators too:
76-
*
77-
* $d1->abs();
78-
* $d1->sqrt();
79-
* $d1->log10();
80-
* $d1->round($scale);
81-
* $d1->additiveInverse();
82-
*/
42+
* First of all, you can take a look on the [bugtracker](https://github.com/Litipk/php-bignumbers/issues) and decide if there is something that you want to do :wink: . If you think there are missing improvements in this file, then you are invited to modify the TODO list.
43+
* You can also send us bug reports using the same bugtracker.
44+
* If you are really interested on helping to improve Litipk\BigNumbers, we recommend to read the [contributing guidelines](https://github.com/Litipk/php-bignumbers/blob/master/CONTRIBUTING.md).
8345

84-
$five = Decimal::fromInteger(-5)->abs();
85-
$six = Decimal::fromInteger(6)->abs();
86-
87-
$three = Decimal::fromInteger(9)->sqrt();
88-
89-
Decimal::fromString('0.06')->round(0)->equals(Decimal::fromString('0')); // returns true
90-
Decimal::fromString('0.06')->round(1)->equals(Decimal::fromString('0.1')); // returns true
91-
92-
$five->additiveInverse()->equals(Decimal::fromInteger(-5)); // returns true
93-
94-
/**
95-
* You can check many properties of your numbers:
96-
*
97-
* $d1->isNegative();
98-
* $d1->isZero();
99-
* $d1->isPositive();
100-
* $d1->isInfinite();
101-
* $d1->isNaN();
102-
*/
103-
104-
$zero = Decimal::fromInteger(0);
105-
$zero->isZero(); // Returns true
106-
107-
$five->div($zero)->isNaN(); // Returns true
108-
$zero->div($five)->isNaN(); // Returns false
109-
110-
$five->additiveInverse()->sqrt()->isNaN(); // Returns true
111-
?>
112-
```
46+
## License
11347

114-
The documentation is incomplete, if you want to use
115-
all the features of this package, you can see which
116-
public methods are declared in the Decimal class.
48+
Litipk\BigNumbers is licensed under the [MIT License](https://github.com/Litipk/php-bignumbers/blob/master/LICENSE).

0 commit comments

Comments
 (0)