31 template <
typename Po
intOrRect>
37 template <
typename Po
intOrRect>
50 roundToInt ((
float) pos.getHeight() / scale)) : pos;
58 roundToInt ((
float) pos.getHeight() * scale)) : pos;
65 pos.getWidth() / scale,
66 pos.getHeight() / scale) : pos;
73 pos.getWidth() * scale,
74 pos.getHeight() * scale) : pos;
77 template <
typename Po
intOrRect>
83 template <
typename Po
intOrRect>
89 template <
typename Po
intOrRect>
95 template <
typename Po
intOrRect>
112 if (
auto* peer = comp.
getPeer())
114 pos = peer->globalToLocal (pos);
115 auto&
peerComp = peer->getComponent();
119 return comp.
getLocalPoint (
nullptr, unscaledScreenPosToScaled (comp, pos));
constexpr bool approximatelyEqual(Type a, Type b, Tolerance< Type > tolerance=Tolerance< Type >{} .withAbsolute(std::numeric_limits< Type >::min()) .withRelative(std::numeric_limits< Type >::epsilon()))
Returns true if the two floating-point numbers are approximately equal.