Skip to content

API 2.0 thoughts #10

Description

@dereuromark

Currently, the API is as follows

Default scale vs required argument for scale

  • multiply() by default adds the scales of each number.
  • divide() requires a 2nd param scale, and right now the demo defaults to the max scale of the two numbers.
    So 1 and 2 result in 0 as the scale of that result cuts of the decimal values.

We could think to also auto-calculate scale for divide() as max($one->scale, $two->scale) of each elements scale similar to multiply().

Speaking API (no le, gt methods).

  • Not all the methods are fully speaking yet, sqrt(), pow() etc. Wonder if we want to make those more verbose or if those are already clear enough.

Thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions