OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, Google Inc. All rights reserved. | 2 * Copyright (c) 2012, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 #else | 146 #else |
147 return m_value; | 147 return m_value; |
148 #endif | 148 #endif |
149 } | 149 } |
150 | 150 |
151 int floor() const | 151 int floor() const |
152 { | 152 { |
153 return toInt(); | 153 return toInt(); |
154 } | 154 } |
155 | 155 |
156 static float epsilon() { return 1 / kFixedPointDenominator; } | 156 static float epsilon() { return 1.0f / kFixedPointDenominator; } |
157 static const FractionalLayoutUnit max() | 157 static const FractionalLayoutUnit max() |
158 { | 158 { |
159 FractionalLayoutUnit m; | 159 FractionalLayoutUnit m; |
160 m.m_value = std::numeric_limits<int>::max(); | 160 m.m_value = std::numeric_limits<int>::max(); |
161 return m; | 161 return m; |
162 } | 162 } |
163 static const FractionalLayoutUnit min() | 163 static const FractionalLayoutUnit min() |
164 { | 164 { |
165 FractionalLayoutUnit m; | 165 FractionalLayoutUnit m; |
166 m.m_value = std::numeric_limits<int>::min(); | 166 m.m_value = std::numeric_limits<int>::min(); |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 float v; | 616 float v; |
617 stream >> v; | 617 stream >> v; |
618 value = v; | 618 value = v; |
619 return stream; | 619 return stream; |
620 } | 620 } |
621 #endif | 621 #endif |
622 | 622 |
623 } // namespace WebCore | 623 } // namespace WebCore |
624 | 624 |
625 #endif // FractionalLayoutUnit_h | 625 #endif // FractionalLayoutUnit_h |
OLD | NEW |