Honeycomb  0.1
Component-Model Framework
Float.h
Go to the documentation of this file.
1 // Honeycomb, Copyright (C) 2015 NewGamePlus Inc. Distributed under the Boost Software License v1.0.
2 #pragma once
3 
4 #include "Honey/Math/Real.h"
5 
6 namespace honey
7 {
8 
9 class Double_;
10 
12 class Float_ : public RealBase<float>
13 {
14 public:
16 
17  static float abs(float x) { return fabsf(x); }
18  static float ceil(float x) { return ceilf(x); }
19  static float floor(float x) { return floorf(x); }
20  static float round(float x) { return floorf(x + 0.5f); }
21  static float trunc(float x) { return (x < 0.f) ? -floorf(-x) : floorf(x); }
22  static float frac(float x) { float whole; return modff(x, &whole); }
23  static float mod(float x, float y) { return fmodf(x, y); }
24  static float sqrt(float x) { return sqrtf(x); }
25  static float exp(float x) { return expf(x); }
26  static float pow(float x, float y) { return powf(x, y); }
27  static float log(float x) { return logf(x); }
28  static float sin(float x) { return sinf(x); }
29  static float asin(float x) { return asinf(x); }
30  static float cos(float x) { return cosf(x); }
31  static float acos(float x) { return acosf(x); }
32  static float tan(float x) { return tanf(x); }
33  static float atan(float x) { return atanf(x); }
34  static float atan2(float y, float x) { return atan2f(y, x); }
35 
36  static const float zero;
37  static const float smallest;
38  static const float epsilon;
39  static const float zeroTol;
40  static const float quarter;
41  static const float half;
42  static const float one;
43  static const float sqrtTwo;
44  static const float two;
45  static const float e;
46  static const float piEigth;
47  static const float piQuarter;
48  static const float piHalf;
49  static const float pi;
50  static const float piAndHalf;
51  static const float piTwo;
52  static const float max;
53  static const float inf;
54  static const float nan;
55 };
56 
59 
63 
64 }
65 
static const float pi
Definition: Float.h:49
static const float inf
Definition: Float.h:53
static float floor(float x)
Definition: Float.h:19
Float_::Real Float
float type
Definition: Float.h:61
static float asin(float x)
Definition: Float.h:29
static float acos(float x)
Definition: Float.h:31
static const float piEigth
Definition: Float.h:46
Defines 64-bit floating point operations and constants.
Definition: Double.h:10
static float round(float x)
Definition: Float.h:20
static const float max
Definition: Float.h:52
static const float zeroTol
Definition: Float.h:39
Defines floating point operations and constants.
Definition: Float.h:12
static const float half
Definition: Float.h:41
static const float e
Definition: Float.h:45
static const float piTwo
Definition: Float.h:51
static float sqrt(float x)
Definition: Float.h:24
static const float two
Definition: Float.h:44
static float abs(float x)
Definition: Float.h:17
static float atan(float x)
Definition: Float.h:33
static float pow(float x, float y)
Definition: Float.h:26
static float ceil(float x)
Definition: Float.h:18
static float tan(float x)
Definition: Float.h:32
static const float piQuarter
Definition: Float.h:47
Base class for real number operations.
Definition: Real.h:11
static const float epsilon
Definition: Float.h:38
static float atan2(float y, float x)
Definition: Float.h:34
static float sin(float x)
Definition: Float.h:28
static float trunc(float x)
Definition: Float.h:21
static float cos(float x)
Definition: Float.h:30
static const float quarter
Definition: Float.h:40
float Real
Definition: Real.h:14
static const float one
Definition: Float.h:42
static const float nan
Definition: Float.h:54
static float frac(float x)
Definition: Float.h:22
static const float piAndHalf
Definition: Float.h:50
static const float smallest
Definition: Float.h:37
static float mod(float x, float y)
Definition: Float.h:23
static float log(float x)
Definition: Float.h:27
Double_ DoubleType
Definition: Float.h:15
static const float zero
Definition: Float.h:36
static const float piHalf
Definition: Float.h:48
static const float sqrtTwo
Definition: Float.h:43
static float exp(float x)
Definition: Float.h:25
Global Honeycomb namespace.