Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

34 rader
820 B

  1. /*
  2. Copyright 2017 Google LLC
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package spanner
  14. // maxUint64 returns the maximum of two uint64
  15. func maxUint64(a, b uint64) uint64 {
  16. if a > b {
  17. return a
  18. }
  19. return b
  20. }
  21. // minUint64 returns the minimum of two uint64
  22. func minUint64(a, b uint64) uint64 {
  23. if a > b {
  24. return b
  25. }
  26. return a
  27. }