Flutter Engine
The Flutter Engine
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#ifndef FLUTTER_IMPELLER_GEOMETRY_CONSTANTS_H_
6#define FLUTTER_IMPELLER_GEOMETRY_CONSTANTS_H_
7
8namespace impeller {
9
10// e
11constexpr float kE = 2.7182818284590452354f;
12
13// log_2 e
14constexpr float kLog2E = 1.4426950408889634074f;
15
16// log_10 e
17constexpr float kLog10E = 0.43429448190325182765f;
18
19// log_e 2
20constexpr float kLogE2 = 0.69314718055994530942f;
21
22// log_e 10
23constexpr float kLogE10 = 2.30258509299404568402f;
24
25// pi
26constexpr float kPi = 3.14159265358979323846f;
27
28// pi*2
29constexpr float k2Pi = 6.28318530717958647693f;
30
31// pi/2
32constexpr float kPiOver2 = 1.57079632679489661923f;
33
34// pi/4
35constexpr float kPiOver4 = 0.78539816339744830962f;
36
37// 1/pi
38constexpr float k1OverPi = 0.31830988618379067154f;
39
40// 2/pi
41constexpr float k2OverPi = 0.63661977236758134308f;
42
43// 2/sqrt(pi)
44constexpr float k2OverSqrtPi = 1.12837916709551257390f;
45
46// sqrt(2)
47constexpr float kSqrt2 = 1.41421356237309504880f;
48
49// 1/sqrt(2)
50constexpr float k1OverSqrt2 = 0.70710678118654752440f;
51
52// phi
53constexpr float kPhi = 1.61803398874989484820f;
54
55// 0.001
56constexpr float kEhCloseEnough = 1e-3f;
57
58} // namespace impeller
59
60#endif // FLUTTER_IMPELLER_GEOMETRY_CONSTANTS_H_
constexpr float k2Pi
Definition: constants.h:29
constexpr float k2OverSqrtPi
Definition: constants.h:44
constexpr float kPi
Definition: constants.h:26
constexpr float kEhCloseEnough
Definition: constants.h:56
constexpr float kE
Definition: constants.h:11
constexpr float kPiOver2
Definition: constants.h:32
constexpr float kLog10E
Definition: constants.h:17
constexpr float kLogE10
Definition: constants.h:23
constexpr float kLog2E
Definition: constants.h:14
constexpr float kPiOver4
Definition: constants.h:35
constexpr float kSqrt2
Definition: constants.h:47
constexpr float kLogE2
Definition: constants.h:20
constexpr float k1OverPi
Definition: constants.h:38
constexpr float k2OverPi
Definition: constants.h:41
constexpr float kPhi
Definition: constants.h:53
constexpr float k1OverSqrt2
Definition: constants.h:50