fixedpoint.h (466B)
1 #pragma once 2 3 #include "private/std.h" 4 #include "private/macros.h" 5 6 /// We use fixed point representation of beat time and seconds time 7 /// Usage: 8 /// double x = ...; // in beats 9 /// clap_beattime y = round(CLAP_BEATTIME_FACTOR * x); 10 11 // This will never change 12 static const CLAP_CONSTEXPR int64_t CLAP_BEATTIME_FACTOR = 1LL << 31; 13 static const CLAP_CONSTEXPR int64_t CLAP_SECTIME_FACTOR = 1LL << 31; 14 15 typedef int64_t clap_beattime; 16 typedef int64_t clap_sectime;