| /* | |
| * Copyright 2014 Google Inc. | |
| * | |
| * Use of this source code is governed by a BSD-style license that can be | |
| * found in the LICENSE file. | |
| */ | |
| #ifndef SkHalf_DEFINED | |
| #define SkHalf_DEFINED | |
| #include "SkTypes.h" | |
| // 16-bit floating point value | |
| // format is 1 bit sign, 5 bits exponent, 10 bits mantissa | |
| // only used for storage | |
| typedef uint16_t SkHalf; | |
| // convert between half and single precision floating point | |
| float SkHalfToFloat(SkHalf h); | |
| SkHalf SkFloatToHalf(float f); | |
| #endif |