PrevUpHomeNext

esv::cos


Our animals love each other.

esv::cos

esv::cos is a function object of class esv::cos_class.

Calling Sig

Result type is always floating (auto-deduced), arg type is auto-deduced

constexpr auto result = esv::cos(value);

Result type is explicit set, arg type is auto-deduced

constexpr auto result = esv::cos.fn<result_type>(value);

Result type is explicit set, arg type is explicit set

constexpr auto result = esv::cos.fn<result_type, arg_type>(value);

Note

[Note] Note
  • The returned float type is one of esv::f32, esv::f64, esv::f128, esv::fmax, esv::fx32, esv::fx64, esv::fx128, esv::fxmax.
  • constexpr support.

Header

#include <esvcpp/math.hpp>

c++ example

#include <esvcpp/math.hpp>
#include <esvcpp/core.hpp>

int main()
{
	constexpr auto x = esv::cos(std::numbers::pi/4);
	constexpr esv::fx32 y = x;
	constexpr auto z = esv::cos(y); // return esv::fx32
	esv::print(x, y, z);
}

See Also

esv::sin

esv::print


PrevUpHomeNext

esv::print