Returns true if either of the width or height are less than or equal to zero.
Returns true if both width and height values are zero.
Returns true if both width and height values are equal to zero to within 4 decimal places of precision.
Returns a new Size
instance with values copied from this one.
Set the width and height properties.
The widthOrSize
parameter can be any object containing 'width' and 'height' properties, or a numeric value for the 'width' value.
In the latter case, if a height
parameter is passed, it is assigned to the 'height' value; otherwise the widthOrSize
parameter
is used for both 'width' and 'height'.
Optional
height: numberReturns true if this size equals the widthOrSize
SizeType or width & height values.
Optional
height: numberReturns true is this size equals the given SizeType to within epsilon
decimal places of precision.
Returns a string representation of an object.
Static
addStatic
multiplyStatic
newStatic
setSets the width and height values of a SizeType object.
The widthOrSize
parameter can be any object containing 'width' and 'height' properties, or a numeric value for the 'width' value.
In the latter case, if a height
parameter is passed, it is assigned to the 'height' value; otherwise the widthOrSize
parameter
is used for both 'width' and 'height'.
Static
isReturns true if either of the width or height are less than or equal to zero.
Static
isStatic
fuzzyReturns true if both width and height of sz
are within epsilon
delta of zero.
Static
equalsStatic
fuzzyStatic
plus_Static
plusStatic
times_Static
timesStatic
to
The
Size
class represents an object withwidth
andheight
properties. Convenience properties and methods are provided for various operations. It also provides static methods for working with anySizeType
object (anything withwidth
andheight
properties).