xref: /aosp_15_r20/external/skia/modules/bentleyottmann/include/Int96.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 // Copyright 2023 Google LLC
2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3 
4 #ifndef Int96_DEFINED
5 #define Int96_DEFINED
6 
7 #include <cstdint>
8 
9 namespace bentleyottmann {
10 struct Int96 {
11     int64_t hi;
12     uint32_t lo;
13 
14     static Int96 Make(int32_t a);
15     static Int96 Make(int64_t a);
16 };
17 bool operator== (const Int96& a, const Int96& b);
18 bool operator< (const Int96& a, const Int96& b);
19 Int96 operator+ (const Int96& a, const Int96& b);
20 Int96 multiply(int64_t a, int32_t b);
21 Int96 multiply(int32_t a, int64_t b);
22 
23 
24 }  // namespace bentleyottmann
25 #endif  // Int96_DEFINED
26