summaryrefslogtreecommitdiff
path: root/include/math_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/math_util.h')
-rw-r--r--include/math_util.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/math_util.h b/include/math_util.h
index 9ee075839e..51065d2bce 100644
--- a/include/math_util.h
+++ b/include/math_util.h
@@ -1,4 +1,4 @@
-/* Copyright 2014 The Chromium OS Authors. All rights reserved.
+/* Copyright 2014 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -40,9 +40,9 @@ typedef int64_t fp_inter_t;
#define INT_TO_FP(x) ((fp_t)(x) << FP_BITS)
#define FP_TO_INT(x) ((int32_t)((x) >> FP_BITS))
/* Float to fixed-point, only for compile-time constants and unit tests */
-#define FLOAT_TO_FP(x) ((fp_t)((x) * (float)(1<<FP_BITS)))
+#define FLOAT_TO_FP(x) ((fp_t)((x) * (float)(1 << FP_BITS)))
/* Fixed-point to float, for unit tests */
-#define FP_TO_FLOAT(x) ((float)(x) / (float)(1<<FP_BITS))
+#define FP_TO_FLOAT(x) ((float)(x) / (float)(1 << FP_BITS))
#define FLT_MAX INT32_MAX
#define FLT_MIN INT32_MIN
@@ -158,9 +158,7 @@ typedef fp_t mat33_fp_t[3][3];
typedef int intv3_t[3];
/* For vectors, define which coordinates are in which location. */
-enum {
- X, Y, Z, W
-};
+enum { X, Y, Z, W };
/*
* Return absolute value of x. Note that as a macro expansion, this may have
* side effects if x includes function calls, which is why inline functions
@@ -194,7 +192,6 @@ void cross_product(const intv3_t v1, const intv3_t v2, intv3_t v);
*/
void vector_scale(intv3_t v, fp_t s);
-
/**
* Find the cosine of the angle between two vectors.
*