Skip to content

Commit

Permalink
Update to Coin Class
Browse files Browse the repository at this point in the history
  • Loading branch information
startailcoon committed Oct 7, 2023
1 parent ddefbb3 commit 4f2330d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/formatCoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class Coin {
private int $decimals = 8; // Gridcoin default decimals
private int $value = 0;

public function setDecimals($decimals) {
$this->decimals = $decimals;
public function __construct(int|float $v = 0) {
$this->add($v);
}

public function add(int|float $v) {

if(is_float($v)) {
Expand Down

0 comments on commit 4f2330d

Please sign in to comment.