Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
Real.h
Go to the documentation of this file.
1#pragma once
2
3#include <Common/primitive_type.h>
4
5#include <vector>
6
7namespace ph::math
8{
9
10class Real
11{
12public:
13 inline Real() :
14 Real(0.0_r) {}
15
16 inline Real(const real value) :
17 m_value(value) {}
18
19 inline Real(const std::vector<real>& values) :
20 Real(values.empty() ? 0.0_r : values[0]) {}
21
22 inline ~Real() = default;
23
24 inline operator real () const
25 {
26 return m_value;
27 }
28
29private:
30 real m_value;
31};
32
33}// end namespace ph::math
Definition Real.h:11
Real()
Definition Real.h:13
Real(const std::vector< real > &values)
Definition Real.h:19
~Real()=default
Real(const real value)
Definition Real.h:16
Math functions and utilities.
Definition TransformInfo.h:10