OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:ClampToInt
(Results
1 - 2
of
2
) sorted by null
/external/chromium_org/ui/gfx/
safe_integer_conversions.h
15
inline int
ClampToInt
(float value) {
26
return
ClampToInt
(std::floor(value));
30
return
ClampToInt
(std::ceil(value));
39
return
ClampToInt
(rounded);
safe_integer_conversions_unittest.cc
13
TEST(SafeIntegerConversions,
ClampToInt
) {
14
EXPECT_EQ(0,
ClampToInt
(std::numeric_limits<float>::quiet_NaN()));
23
EXPECT_EQ(int_max,
ClampToInt
(infinity));
24
EXPECT_EQ(int_max,
ClampToInt
(max));
25
EXPECT_EQ(int_max,
ClampToInt
(max + 100));
27
EXPECT_EQ(-100,
ClampToInt
(-100.5f));
28
EXPECT_EQ(0,
ClampToInt
(0));
29
EXPECT_EQ(100,
ClampToInt
(100.5f));
31
EXPECT_EQ(int_min,
ClampToInt
(-infinity));
32
EXPECT_EQ(int_min,
ClampToInt
(min))
[
all
...]
Completed in 1283 milliseconds