Skip to content

Missing floor() and ceil() methods #201

Closed

Description

@SableRaf

Calling floor() and ceil() return, respectively:

RuntimeError: NameError: name 'floor' is not defined

RuntimeError: NameError: name 'ceil' is not defined

This doesn't seem to be the case with round()

Activity

  1. Nitish-bot commented on Nov 10, 2026

    @Nitish-bot
    Contributor

    @SableRaf I couldn’t reproduce this on current main

    I ran this small sketch with a draw() loop:

    from processing_py import *
    
    def setup():
        size(200, 200)
    
    def draw():
        background(0)
        print(floor(1.5), ceil(1.5), round(1.5))
    
    run()
    

    It ran with no errors and floor/ceil have been exported since #140

    Could you share a bit more on how you ran into the errors?

  2. SableRaf commented on Nov 10, 2026

    @SableRaf
    ContributorAuthor

    That was 4 months ago. It's possible @tychedelia implemented ceil() and floor() in the meantime but omitted to close the issue.

  3. Nitish-bot commented on Nov 10, 2026

    @Nitish-bot
    Contributor

    Indeed but the PR that added those functions was merged before you opened the issue so it is possible that there is some way to reproduce the it

  4. SableRaf commented on Nov 11, 2026

    @SableRaf
    ContributorAuthor

    I see! Thanks @Nitish-bot. I should have included notes on reproducing the issue. Maybe that PR was merged at that point but not included in the released version on PyPI yet?

  5. Nitish-bot commented on Nov 12, 2026

    @Nitish-bot
    Contributor

    yeah that's probably it! It would also help to run the tests on main which should avoid false positives like this.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions