github.com/andybalholm/brotli@v1.0.6/platform.go (about)

     1  package 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  
     9  func brotli_min_double(a float64, b float64) float64 {
    10  	if a < b {
    11  		return a
    12  	} else {
    13  		return b
    14  	}
    15  }
    16  
    17  func brotli_max_double(a float64, b float64) float64 {
    18  	if a > b {
    19  		return a
    20  	} else {
    21  		return b
    22  	}
    23  }
    24  
    25  func brotli_min_float(a float32, b float32) float32 {
    26  	if a < b {
    27  		return a
    28  	} else {
    29  		return b
    30  	}
    31  }
    32  
    33  func brotli_max_float(a float32, b float32) float32 {
    34  	if a > b {
    35  		return a
    36  	} else {
    37  		return b
    38  	}
    39  }
    40  
    41  func brotli_min_int(a int, b int) int {
    42  	if a < b {
    43  		return a
    44  	} else {
    45  		return b
    46  	}
    47  }
    48  
    49  func brotli_max_int(a int, b int) int {
    50  	if a > b {
    51  		return a
    52  	} else {
    53  		return b
    54  	}
    55  }
    56  
    57  func brotli_min_size_t(a uint, b uint) uint {
    58  	if a < b {
    59  		return a
    60  	} else {
    61  		return b
    62  	}
    63  }
    64  
    65  func brotli_max_size_t(a uint, b uint) uint {
    66  	if a > b {
    67  		return a
    68  	} else {
    69  		return b
    70  	}
    71  }
    72  
    73  func brotli_min_uint32_t(a uint32, b uint32) uint32 {
    74  	if a < b {
    75  		return a
    76  	} else {
    77  		return b
    78  	}
    79  }
    80  
    81  func brotli_max_uint32_t(a uint32, b uint32) uint32 {
    82  	if a > b {
    83  		return a
    84  	} else {
    85  		return b
    86  	}
    87  }
    88  
    89  func brotli_min_uint8_t(a byte, b byte) byte {
    90  	if a < b {
    91  		return a
    92  	} else {
    93  		return b
    94  	}
    95  }
    96  
    97  func brotli_max_uint8_t(a byte, b byte) byte {
    98  	if a > b {
    99  		return a
   100  	} else {
   101  		return b
   102  	}
   103  }