PrevUpHomeNext

.mod method


All rational animals get bored.

.mod member function of esv::class_type

esv::class_type::mod

Method .mod of esv::class_type is used to get the modulus value of the object value.

Positive/Negative flag rules, a % b :

c++ example

#include <esvcpp/core.hpp>

int main()
{
	constexpr esv::ix32 a = 13;
	constexpr esv::fx64 b = -3.7;
	constexpr auto c = a.mod(4);
	constexpr auto d = b.mod(1.3);
	esv::print(c, d);	// 1 -1.1
}

See Also

.quo_mod method

.quo method

esv::ix32

esv::fx64


PrevUpHomeNext

E