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

Default value for $scale should not be null (arccos, arctan, arcsec, arccsc, tan, cotan etc.) #68

Open
gregor-tb opened this issue Aug 14, 2019 · 0 comments

Comments

@gregor-tb
Copy link

public function arccos(int $scale = null): Decimal

$scale is null here by default, but used like (int) 0. This is working in the additions $scale + 2 etc., but crashes on calling round(int) method, which does not accept null.

But later it is checked for explicit null value

$scale = ($scale === null) ? 32 : $scale;

@gregor-tb gregor-tb changed the title arccos() default value for $scale should not be null arccos()/arctan() default value for $scale should not be null Aug 14, 2019
@gregor-tb gregor-tb changed the title arccos()/arctan() default value for $scale should not be null arccos/arctan/arcsec default value for $scale should not be null Aug 14, 2019
@gregor-tb gregor-tb changed the title arccos/arctan/arcsec default value for $scale should not be null Default value for $scale should not be null (arccos, arctan, arcsec, arccsc, etc.) Aug 14, 2019
@gregor-tb gregor-tb changed the title Default value for $scale should not be null (arccos, arctan, arcsec, arccsc, etc.) Default value for $scale should not be null (arccos, arctan, arcsec, arccsc, tan, etc.) Aug 14, 2019
@gregor-tb gregor-tb changed the title Default value for $scale should not be null (arccos, arctan, arcsec, arccsc, tan, etc.) Default value for $scale should not be null (arccos, arctan, arcsec, arccsc, tan, cotan etc.) Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant