Skip to content

fix: support scalar * rect and rect * scalar multiplication - #102

Open
matthewdean wants to merge 1 commit into
mainfrom
fix/rect-mul-operator
Open

fix: support scalar * rect and rect * scalar multiplication#102
matthewdean wants to merge 1 commit into
mainfrom
fix/rect-mul-operator

Conversation

@matthewdean

Copy link
Copy Markdown
Collaborator

Summary

  • Consolidate 3 separate rect multiplication arms (Rect*Int, Rect*Float, Float*Rect) into 2 generalized arms using match guards
  • Add missing Int * Rect case that was causing "Mul operator only works with ints and floats" errors

Lingo allows multiplying a rect by a scalar (e.g. 100 * rect(...)) but the Int * Rect operand order was unhandled.

@github-actions github-actions Bot added the lingo label Apr 5, 2026
@matthewdean
matthewdean marked this pull request as ready for review April 5, 2026 19:03
@matthewdean
matthewdean requested a review from chameleonxxl April 5, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant