1

The plugin for GIFs or Movies defines a FramesPerSecond attribute of type

int[2] (rational)

What does that mean? One possible interpretation I came up with is that the second item in the array holds the fractional part. Is that so? If yes, why not just use a float instead?

Larry Gritz
  • 13,331
  • 5
  • 42
  • 42
user1785730
  • 3,150
  • 4
  • 27
  • 50

1 Answers1

1

"Rational" means it's a fraction. The float value would be (approximately) float(value[0])/float(value[1]).

The reason I said "approximately", and the reason it's not a float to begin with, is because floating point numbers cannot exactly represent many useful fractions.

Larry Gritz
  • 13,331
  • 5
  • 42
  • 42