这是indexloc提供的服务,不要输入任何密码
Skip to content

Wraps calc.ceil and calc.floor in int #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

cskeeters
Copy link

This module errors with the main branch of Typst due to typst/typst#4900.

Breaking Changes

calc.floor(float), calc.ceil(float) and calc.trunc(float) now return floats instead of integers as the rounded float might be larger than the max integer (or less than the minimum integer).

This patch addresses the following errors. In this case missing_rows is a float because it depends on expected_rows which is calculated with calc.ceil. There were many issues like this one.

error: cannot multiply array with float
    ┌─ @local/tablex:0.0.8/tablex.typ:320:16
    │
320 │         rows += (rows.last(),) * missing_rows
    │                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

typst/typst#4900

Breaking Changes

calc.floor(float), calc.ceil(float) and calc.trunc(float) now return
floats instead of integers as the rounded float might be larger than the
max integer (or less than the minimum integer).
@PgBiel
Copy link
Owner

PgBiel commented Sep 30, 2024

Thank you for the PR. We decided to revert the breaking change in typst/typst#5064 .

@PgBiel PgBiel closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants