PrevUpHomeNext

.abs method


.abs member function of esv::class_type

esv::class_type::abs

Method .abs of esv::class_type can be used to get the absolute value of integral or floating value of esv::class_type.

c++ example

#include <esvcpp/core.hpp>

int main()
{
	constexpr esv::ix32 a = 254;
	constexpr esv::fx64 b = 542.445;
	constexpr esv::ix32 c = -254;
	constexpr esv::fx64 d = -542.445;
	esv::print(a.abs(), b.abs(), c.abs(), d.abs());	// 254 542.445 254 542.445
}

See Also

esv::ix32

esv::fx64


PrevUpHomeNext

E