nCine/Base/Algorithms.h file

Namespaces

namespace nCine
Root namespace of nCine game engine.

Functions

auto lerp(float a, float b, float ratio) -> float
auto lerp(std::int32_t a, std::int32_t b, float ratio) -> std::int32_t
auto lerpByTime(float a, float b, float ratio, float timeMult) -> float
auto copyStringFirst(char* dest, std::int32_t destSize, const char* source, std::int32_t count = -1) -> std::int32_t
template<std::size_t size>
auto copyStringFirst(char(&dest)[size], const char* source, std::int32_t count = -1) -> std::int32_t
template<std::size_t size>
auto copyStringFirst(char(&dest)[size], Containers::StringView source) -> std::int32_t
auto formatString(char* buffer, std::size_t maxLen, const char* format, ...) -> std::int32_t
template<std::size_t size, class ... TArg>
auto formatString(char(&dest)[size], const char* format, const TArg&... args) -> std::int32_t
void u32tos(std::uint32_t value, char* buffer)
void i32tos(std::int32_t value, char* buffer)
void u64tos(std::uint64_t value, char* buffer)
void i64tos(std::int64_t value, char* buffer)
void ftos(double value, char* buffer, std::int32_t bufferSize)
auto isDigit(char c) -> bool constexpr
auto stou32(const char* str, std::size_t length) -> std::uint32_t constexpr
auto stou64(const char* str, std::size_t length) -> std::uint64_t constexpr
template<class Iter, class Compare>
void sort(Iter begin, Iter end, Compare comp)
template<class Iter>
void sort(Iter begin, Iter end)
auto halfToFloat(std::uint16_t value) -> float
auto floatToHalf(float value) -> std::uint16_t
auto parseVersion(Containers::StringView version) -> std::uint64_t constexpr
template<class Iterator>
static auto toBase64Url(const Iterator begin, const Iterator end) -> std::string
auto crc32(Containers::ArrayView<std::uint8_t> data) -> std::uint32_t
auto crc32(IO::Stream& stream) -> std::uint32_t