Add support for float numbers in rem() arguments (#4858)

* Add support for float numbers in rem() arguments

* Update docs

* Rename to prevent name collision in docs

* Update docs after rename to NumberArg

* Fix parameter types to follow naming convention

* Change doc comment description to not refer to floating point

* Update docs after NumberArg doc change

* Change function to be more condensed

* Change to not try to preserve ints

* Update docs to use f64

* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-macos-8-cores)

* Trigger CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jonathan Tran
2025-01-02 16:52:01 -05:00
committed by GitHub
parent d478d81156
commit ac7bd28c5a
4 changed files with 27 additions and 30 deletions

File diff suppressed because one or more lines are too long

View File

@ -153550,12 +153550,12 @@
"args": [
{
"name": "num",
"type": "i64",
"type": "number",
"schema": {
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
"title": "int64",
"type": "integer",
"format": "int64"
"title": "double",
"type": "number",
"format": "double"
},
"required": true,
"description": "The number which will be divided by `divisor`.",
@ -153563,12 +153563,12 @@
},
{
"name": "divisor",
"type": "i64",
"type": "number",
"schema": {
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
"title": "int64",
"type": "integer",
"format": "int64"
"title": "double",
"type": "number",
"format": "double"
},
"required": true,
"description": "The number which will divide `num`.",
@ -153577,12 +153577,12 @@
],
"returnValue": {
"name": "",
"type": "i64",
"type": "number",
"schema": {
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
"title": "int64",
"type": "integer",
"format": "int64"
"title": "double",
"type": "number",
"format": "double"
},
"required": true,
"labelRequired": true
@ -153590,7 +153590,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"assertEqual(rem(7, divisor = 4), 3, 0.01, \"remainder is 3\")\nassertEqual(rem(-7, divisor = 4), -3, 0.01, \"remainder is -3\")\nassertEqual(rem(7, divisor = -4), 3, 0.01, \"remainder is 3\")"
"assertEqual(rem(7, divisor = 4), 3, 0.01, \"remainder is 3\")\nassertEqual(rem(-7, divisor = 4), -3, 0.01, \"remainder is -3\")\nassertEqual(rem(7, divisor = -4), 3, 0.01, \"remainder is 3\")\nassertEqual(rem(6, divisor = 2.5), 1, 0.01, \"remainder is 1\")\nassertEqual(rem(6.5, divisor = 2.5), 1.5, 0.01, \"remainder is 1.5\")\nassertEqual(rem(6.5, divisor = 2), 0.5, 0.01, \"remainder is 0.5\")"
]
},
{