source: code/trunk/vendor/github.com/andybalholm/brotli/platform.go@ 145

Last change on this file since 145 was 145, checked in by Izuru Yakumo, 22 months ago

Updated the Makefile and vendored depedencies

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 1.3 KB
Line 
1package brotli
2
3/* Copyright 2013 Google Inc. All Rights Reserved.
4
5 Distributed under MIT license.
6 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
7*/
8
9func brotli_min_double(a float64, b float64) float64 {
10 if a < b {
11 return a
12 } else {
13 return b
14 }
15}
16
17func brotli_max_double(a float64, b float64) float64 {
18 if a > b {
19 return a
20 } else {
21 return b
22 }
23}
24
25func brotli_min_float(a float32, b float32) float32 {
26 if a < b {
27 return a
28 } else {
29 return b
30 }
31}
32
33func brotli_max_float(a float32, b float32) float32 {
34 if a > b {
35 return a
36 } else {
37 return b
38 }
39}
40
41func brotli_min_int(a int, b int) int {
42 if a < b {
43 return a
44 } else {
45 return b
46 }
47}
48
49func brotli_max_int(a int, b int) int {
50 if a > b {
51 return a
52 } else {
53 return b
54 }
55}
56
57func brotli_min_size_t(a uint, b uint) uint {
58 if a < b {
59 return a
60 } else {
61 return b
62 }
63}
64
65func brotli_max_size_t(a uint, b uint) uint {
66 if a > b {
67 return a
68 } else {
69 return b
70 }
71}
72
73func brotli_min_uint32_t(a uint32, b uint32) uint32 {
74 if a < b {
75 return a
76 } else {
77 return b
78 }
79}
80
81func brotli_max_uint32_t(a uint32, b uint32) uint32 {
82 if a > b {
83 return a
84 } else {
85 return b
86 }
87}
88
89func brotli_min_uint8_t(a byte, b byte) byte {
90 if a < b {
91 return a
92 } else {
93 return b
94 }
95}
96
97func brotli_max_uint8_t(a byte, b byte) byte {
98 if a > b {
99 return a
100 } else {
101 return b
102 }
103}
Note: See TracBrowser for help on using the repository browser.