View Single Post
Old 14th November 2010, 17:39   #9  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by henryho_hk View Post
Code:
    assert(dst_w == floor(dst_w/unit_w)*unit_w, ...)
    assert(dst_h == floor(dst_h/unit_h)*unit_h, ...)
'floor' is redundant here - since dst_w and unit_w are both integers, so is dst_w/unit_w.

So you could simplify it to
Code:
    assert(dst_w == (dst_w/unit_w)*unit_w, ...)
or even more simply
Code:
    assert(dst_w % unit_w == 0, ...)
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote