nCine/Base/Algorithms.h file

Namespaces

namespace nCine
Root namespace of nCine game engine.

Classes

template<class T>
struct nCine::isIntegral
template<class T, typename = void>
struct nCine::isDestructible
Specialization for trivially destructible types.
template<class T>
struct nCine::isTriviallyDestructible

Functions

template<class T>
auto IsLess(const T& a, const T& b) -> bool
template<class T>
auto IsNotLess(const T& a, const T& b) -> bool
template<class Iterator>
auto isSorted(Iterator first, const Iterator last) -> bool
Returns true if the range is sorted into ascending order.
template<class Iterator, class Compare>
auto isSorted(Iterator first, const Iterator last, Compare comp) -> bool
Returns true if the range is sorted, using a custom comparison.
template<class Iterator>
auto isSortedUntil(Iterator first, const Iterator last) -> const Iterator
Returns an iterator to the first element in the range which does not follow an ascending order, or last if sorted.
template<class Iterator, class Compare>
auto isSortedUntil(Iterator first, const Iterator last, Compare comp) -> const Iterator
Returns an iterator to the first element in the range which does not follow the custom comparison, or last if sorted.
template<class T>
void destructObject(T* ptr)
template<class T>
void destructArray(T* ptr, std::uint32_t numElements)
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, ...) -> int
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