mirror of
https://github.com/danog/math.git
synced 2025-01-22 21:51:22 +01:00
Improve docblock documentation
This commit is contained in:
parent
aa43c637b7
commit
9017519b5d
@ -45,6 +45,8 @@ final class BigDecimal extends BigNumber implements \Serializable
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a BigDecimal of the given value.
|
||||
*
|
||||
* @param BigNumber|number|string $value
|
||||
*
|
||||
* @return BigDecimal
|
||||
@ -57,12 +59,16 @@ final class BigDecimal extends BigNumber implements \Serializable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BigInteger|int|string $value An integer representing the unscaled value of the number.
|
||||
* @param int $scale The scale of the number, positive or zero.
|
||||
* Creates a BigDecimal from an unscaled value and a scale.
|
||||
*
|
||||
* Example: `(12345, 3)` will result in the BigDecimal `12.345`.
|
||||
*
|
||||
* @param BigNumber|number|string $value The unscaled value. Must be convertible to a BigInteger.
|
||||
* @param int $scale The scale of the number, positive or zero.
|
||||
*
|
||||
* @return BigDecimal
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws \InvalidArgumentException If the scale is negative.
|
||||
*/
|
||||
public static function ofUnscaledValue($value, $scale = 0)
|
||||
{
|
||||
|
@ -36,6 +36,8 @@ final class BigInteger extends BigNumber implements \Serializable
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a BigInteger of the given value.
|
||||
*
|
||||
* @param BigNumber|number|string $value
|
||||
*
|
||||
* @return BigInteger
|
||||
|
@ -102,6 +102,8 @@ abstract class BigNumber
|
||||
/**
|
||||
* Proxy method to access protected constructors from sibling classes.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param mixed ...$args The arguments to the constructor.
|
||||
*
|
||||
* @return static
|
||||
|
@ -55,6 +55,8 @@ final class BigRational extends BigNumber implements \Serializable
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a BigRational of the given value.
|
||||
*
|
||||
* @param BigNumber|number|string $value
|
||||
*
|
||||
* @return BigRational
|
||||
|
Loading…
x
Reference in New Issue
Block a user