Embedded Template Library 1.0
fibonacci

Classes

struct  etl::factorial< N >
 
struct  etl::fibonacci< N >
 

Detailed Description

fibonacci<N> : Calculates the Nth Fibonacci value.


Class Documentation

◆ etl::factorial

struct etl::factorial
template<size_t N>
struct etl::factorial< N >

Defines value as the Nth factorial number.

Template Parameters
NThe number to find the factorial value of.

Static Public Attributes

static ETL_CONSTANT size_t value = N * factorial<N - 1>::value
 

◆ etl::fibonacci

struct etl::fibonacci
template<size_t N>
struct etl::fibonacci< N >

Defines value as the Nth Fibonacci number.

Template Parameters
NThe number to find the Fibonacci value of.

Static Public Attributes

static ETL_CONSTANT size_t value = fibonacci<N - 1>::value + fibonacci<N - 2>::value