summaryrefslogtreecommitdiffstats
path: root/libutils/include
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2017-03-15 14:03:05 -0700
committerMathias Agopian <mathias@google.com>2017-03-15 14:16:13 -0700
commitf520b73103a327ccf3df581eb1662ae278649b35 (patch)
tree1fa5638fea875db47c255d195bca07a48c43179a /libutils/include
parent819f34a7f358cae920a03de6913c204577305a6e (diff)
downloadsystem_core-f520b73103a327ccf3df581eb1662ae278649b35.tar.gz
system_core-f520b73103a327ccf3df581eb1662ae278649b35.tar.bz2
system_core-f520b73103a327ccf3df581eb1662ae278649b35.zip
Get rid of LinearTransform
It had 3 clients - one in vendor/google_athome which was disabled - one in a device specific folder, which will die out - and one in frameworks/base This reverts commit 6c942304edd136ec5b326265e249c6f1be27830b. Test: compile/run Bug: treble cleanup Change-Id: Ia76009d550c294198c083cf89718bc498b5c9e3e
Diffstat (limited to 'libutils/include')
-rw-r--r--libutils/include/utils/LinearTransform.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/libutils/include/utils/LinearTransform.h b/libutils/include/utils/LinearTransform.h
deleted file mode 100644
index 04cb355c7..000000000
--- a/libutils/include/utils/LinearTransform.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _LIBS_UTILS_LINEAR_TRANSFORM_H
-#define _LIBS_UTILS_LINEAR_TRANSFORM_H
-
-#include <stdint.h>
-
-namespace android {
-
-// LinearTransform defines a structure which hold the definition of a
-// transformation from single dimensional coordinate system A into coordinate
-// system B (and back again). Values in A and in B are 64 bit, the linear
-// scale factor is expressed as a rational number using two 32 bit values.
-//
-// Specifically, let
-// f(a) = b
-// F(b) = f^-1(b) = a
-// then
-//
-// f(a) = (((a - a_zero) * a_to_b_numer) / a_to_b_denom) + b_zero;
-//
-// and
-//
-// F(b) = (((b - b_zero) * a_to_b_denom) / a_to_b_numer) + a_zero;
-//
-struct LinearTransform {
- int64_t a_zero;
- int64_t b_zero;
- int32_t a_to_b_numer;
- uint32_t a_to_b_denom;
-
- // Transform from A->B
- // Returns true on success, or false in the case of a singularity or an
- // overflow.
- bool doForwardTransform(int64_t a_in, int64_t* b_out) const;
-
- // Transform from B->A
- // Returns true on success, or false in the case of a singularity or an
- // overflow.
- bool doReverseTransform(int64_t b_in, int64_t* a_out) const;
-
- // Helpers which will reduce the fraction N/D using Euclid's method.
- template <class T> static void reduce(T* N, T* D);
- static void reduce(int32_t* N, uint32_t* D);
-};
-
-
-}
-
-#endif // _LIBS_UTILS_LINEAR_TRANSFORM_H