Bug Tracker


Ticket #3702 (closed enhancement: fixed)

Opened 5 years ago

Last modified 2 years ago

Math.max should be able to handle more than two args

Reported by: lrbabe Owned by: flesler
Priority: trivial Milestone: 1.3
Component: dimensions Version: 1.2.6
Keywords: Cc: lrbabe
Blocking: Blocked by:


We can spare some bytes and be more efficient by removing unnecessary use of Math.max

The syntax:

Math.max( Math.max(1,2), Math.max(3,4) )

can be replaced by this one:

Math.max( 1, 2, 3, 4 )


patch.txt Download (809 bytes) - added by lrbabe 5 years ago.
patch to remove unnecessary use of Math.max

Change History

Changed 5 years ago by lrbabe

patch to remove unnecessary use of Math.max

comment:1 Changed 5 years ago by flesler

  • Cc lrbabe added
  • Owner set to flesler
  • Status changed from new to assigned
  • Component changed from core to dimensions

Will look into this for 1.3. Thanks!

comment:2 Changed 5 years ago by flesler

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed at [5985].

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


Add a comment

Modify Ticket

as closed

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.