FastLED 3.9.15
Loading...
Searching...
No Matches
ratio.h File Reference

Detailed Description

FastLED ratio implementation - compile-time rational arithmetic.

This header provides ratio types for representing compile-time rational numbers, used primarily for duration period types in fl::chrono.

Definition in file ratio.h.

#include "fl/stl/int.h"
#include "fl/stl/static_assert.h"
+ Include dependency graph for ratio.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fl::ratio< Num, Denom >
 Compile-time rational arithmetic. More...
 

Namespaces

namespace  fl
 Base definition for an LED controller.
 

Typedefs

using fl::centi = ratio<1, 100>
 1/100
 
using fl::deca = ratio<10, 1>
 10/1
 
using fl::deci = ratio<1, 10>
 1/10
 
using fl::giga = ratio<1000000000, 1>
 1,000,000,000/1
 
using fl::hecto = ratio<100, 1>
 100/1
 
using fl::kilo = ratio<1000, 1>
 1,000/1
 
using fl::mega = ratio<1000000, 1>
 1,000,000/1
 
using fl::micro = ratio<1, 1000000>
 1/1,000,000
 
using fl::milli = ratio<1, 1000>
 1/1,000
 
using fl::nano = ratio<1, 1000000000>
 1/1,000,000,000
 
template<typename R1, typename R2>
using fl::ratio_divide
 Divide two ratios at compile time.
 
template<typename R1, typename R2>
using fl::ratio_multiply
 Multiply two ratios at compile time.