| Flutter Impeller |

constants.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #pragma once
6
7 namespace impeller {
8
9 // e
10 constexpr float kE = 2.7182818284590452354f;
11
12 // log_2 e
13 constexpr float kLog2_E = 1.4426950408889634074f;
14
15 // log_10 e
16 constexpr float kLog10_E = 0.43429448190325182765f;
17
18 // log_e 2
19 constexpr float klogE_2 = 0.69314718055994530942f;
20
21 // log_e 10
22 constexpr float klogE_10 = 2.30258509299404568402f;
23
24 // pi
25 constexpr float kPi = 3.14159265358979323846f;
26
27 // pi*2
28 constexpr float k2Pi = 6.28318530717958647693f;
29
30 // pi/2
31 constexpr float kPiOver2 = 1.57079632679489661923f;
32
33 // pi/4
34 constexpr float kPiOver4 = 0.78539816339744830962f;
35
36 // 1/pi
37 constexpr float k1OverPi = 0.31830988618379067154f;
38
39 // 2/pi
40 constexpr float k2OverPi = 0.63661977236758134308f;
41
42 // 2/sqrt(pi)
43 constexpr float k2OverSqrtPi = 1.12837916709551257390f;
44
45 // sqrt(2)
46 constexpr float kSqrt2 = 1.41421356237309504880f;
47
48 // 1/sqrt(2)
49 constexpr float k1OverSqrt2 = 0.70710678118654752440f;
50
51 // phi
52 constexpr float kPhi = 1.61803398874989484820f;
53
54 // 0.001
55 constexpr float kEhCloseEnough = 1e-3f;
56
57 } // namespace impeller
impeller::k1OverSqrt2
constexpr float k1OverSqrt2
Definition: constants.h:49
impeller::kSqrt2
constexpr float kSqrt2
Definition: constants.h:46
impeller::kEhCloseEnough
constexpr float kEhCloseEnough
Definition: constants.h:55
impeller::kPi
constexpr float kPi
Definition: constants.h:25
impeller::kPiOver2
constexpr float kPiOver2
Definition: constants.h:31
impeller::kPhi
constexpr float kPhi
Definition: constants.h:52
impeller::k2Pi
constexpr float k2Pi
Definition: constants.h:28
impeller::k1OverPi
constexpr float k1OverPi
Definition: constants.h:37
impeller::k2OverPi
constexpr float k2OverPi
Definition: constants.h:40
impeller::klogE_10
constexpr float klogE_10
Definition: constants.h:22
impeller::kLog2_E
constexpr float kLog2_E
Definition: constants.h:13
impeller::kLog10_E
constexpr float kLog10_E
Definition: constants.h:16
impeller::kE
constexpr float kE
Definition: constants.h:10
impeller::k2OverSqrtPi
constexpr float k2OverSqrtPi
Definition: constants.h:43
impeller::klogE_2
constexpr float klogE_2
Definition: constants.h:19
impeller
Definition: aiks_context.cc:10
impeller::kPiOver4
constexpr float kPiOver4
Definition: constants.h:34