BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
General maths utilities
Collaboration diagram for General maths utilities:

Files

file  Math.hpp

Namespaces

namespace  util
namespace  util::math

Functions

template<std::integral T>
constexpr auto util::math::is_even (const T value) noexcept -> bool
auto util::math::mul_hi64 (uint64_t first, uint64_t second) noexcept -> uint64_t

Detailed Description

General maths utility functions used throughout the code.

Function Documentation

◆ is_even()

template<std::integral T>
auto util::math::is_even ( const T value) -> bool
nodiscardconstexprnoexcept

Returns true if the given value is an even number.

Definition at line 41 of file Math.hpp.

◆ mul_hi64()

auto util::math::mul_hi64 ( uint64_t first,
uint64_t second ) -> uint64_t
nodiscardnoexcept

Multiplies the two integers and returns the highest 64 bits of the 128-bit result as a 64-bit integer.