mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Avoided some VC warnings.
This commit is contained in:
parent
8fd65cb8c5
commit
518e302d4a
2 changed files with 12 additions and 8 deletions
|
|
@ -101,16 +101,20 @@ public:
|
|||
Point& operator-= (Point other) noexcept { x -= other.x; y -= other.y; return *this; }
|
||||
|
||||
/** Returns a point whose coordinates are multiplied by a given value. */
|
||||
Point operator* (const ValueType multiplier) const noexcept { return Point (x * multiplier, y * multiplier); }
|
||||
|
||||
/** Multiplies the point's co-ordinates by a value. */
|
||||
Point& operator*= (const ValueType multiplier) noexcept { x *= multiplier; y *= multiplier; return *this; }
|
||||
template <typename FloatType>
|
||||
Point operator* (const FloatType multiplier) const noexcept { return Point ((ValueType) (x * multiplier), (ValueType) (y * multiplier)); }
|
||||
|
||||
/** Returns a point whose coordinates are divided by a given value. */
|
||||
Point operator/ (const ValueType divisor) const noexcept { return Point (x / divisor, y / divisor); }
|
||||
template <typename FloatType>
|
||||
Point operator/ (const FloatType divisor) const noexcept { return Point ((ValueType) (x / divisor), (ValueType) (y / divisor)); }
|
||||
|
||||
/** Multiplies the point's co-ordinates by a value. */
|
||||
template <typename FloatType>
|
||||
Point& operator*= (const FloatType multiplier) noexcept { x = (ValueType) (x * multiplier); y = (ValueType) (y * multiplier); return *this; }
|
||||
|
||||
/** Divides the point's co-ordinates by a value. */
|
||||
Point& operator/= (const ValueType divisor) noexcept { x /= divisor; y /= divisor; return *this; }
|
||||
template <typename FloatType>
|
||||
Point& operator/= (const FloatType divisor) noexcept { x = (ValueType) (x / divisor); y = (ValueType) (y / divisor); return *this; }
|
||||
|
||||
/** Returns the inverse of this point. */
|
||||
Point operator-() const noexcept { return Point (-x, -y); }
|
||||
|
|
|
|||
|
|
@ -305,8 +305,8 @@ public:
|
|||
Rectangle operator*= (FloatType scaleFactor) noexcept
|
||||
{
|
||||
pos *= scaleFactor;
|
||||
w *= scaleFactor;
|
||||
h *= scaleFactor;
|
||||
w = (ValueType) (w * scaleFactor);
|
||||
h = (ValueType) (h * scaleFactor);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue