summary refs log tree commit diff
path: root/src/Math/Sigmoid.hpp
blob: f2fa009e477e24a3208fbad6f28e387b349b316a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#include <cmath>
#include "Constants.hpp"

namespace Math {

template <typename T>
T sigmoid(T x) {
    return 1 / (1 + std::pow(E, -x));
}

}