fireworkweb / smpte.php

Easily deal with Timecode SMPTE format in PHP
MIT License
7 stars 9 forks source link

Implicit conversion from float to int loses precision Timecode.php on line 242 #12

Closed seabasseee closed 3 days ago

seabasseee commented 2 weeks ago

Hi,

I get this error when using "uneven frame rates":

Implicit conversion from float 240.23999999999998 to int loses precision in /vendor/fireworkweb/smpte/src/Timecode.php on line 242

Is it possible to change to this?

public function durationInSeconds() : int
{
    return (int) round($this->frameCount / $this->frameRate);
}

Thank you!

dbpolito commented 3 days ago

Fixed with https://github.com/fireworkweb/smpte.php/releases/tag/1.4.0