Property | Type | Description | |
---|---|---|---|
$inExpression | whether this number is in an expression or a literal number Used to determine whether division should take place |
Method | Description | |
---|---|---|
__construct ( $value ) : SassNumber | class constructor. | |
coerce ( array $numeratorUnits, array $denominatorUnits ) : SassNumber | Returns the value of this number converted to other units. | |
getDenominatorUnits ( ) : string | Returns the denominator units of this number. | |
getNumeratorUnits ( ) : string | Returns the numerator units of this number. | |
getUnits ( ) : string | Returns the units of this number. | |
getValue ( ) : float | Returns the value of this number. | |
hasLegalUnits ( ) : boolean | Returns a value indicating if this number has units that can be represented in CSS. | |
hasUnits ( ) : boolean | Returns a value indicating if this number has units. | |
isComparableTo ( $other ) : boolean | Returns a value indicating if this number can be compared to other. | |
isInt ( ) : boolean | Returns a value indicating if this number is an integer. | |
isUnitless ( ) : boolean | Returns a value indicating if this number is unitless. | |
isa ( string $subject ) : mixed | Returns a value indicating if a token of this type can be matched at the start of the subject string. | |
length ( ) : integer | Returns the number of values of SassNumber | |
nth ( $i ) : SassBoolean | SassNumber | Returns the nth value of the SassNumber | |
op_div ( $other ) : mixed | Divides this value by the value of other | |
op_eq ( $other ) : SassBoolean | The SassScript == operation. | |
op_gt ( sassLiteral $other ) : SassBoolean | The SassScript > operation. | |
op_gte ( sassLiteral $other ) : SassBoolean | The SassScript >= operation. | |
op_lt ( sassLiteral $other ) : SassBoolean | The SassScript < operation. | |
op_lte ( sassLiteral $other ) : SassBoolean | The SassScript <= operation. | |
op_minus ( $other ) : mixed | Subtracts the value of other from this value | |
op_modulo ( string $other ) : mixed | Takes the modulus (remainder) of this value divided by the value of other | |
op_plus ( $other ) : mixed | Adds the value of other to the value of this | |
op_times ( $other ) : mixed | Multiplies this value by the value of other | |
op_unary_concat ( ) | ||
op_unary_minus ( ) : SassNumber | Unary - operator | |
op_unary_plus ( ) : SassNumber | Unary + operator | |
toInt ( ) : integer | Returns the integer value. | |
toString ( ) : string | Converts the number to a string with it's units if any. | |
unitString ( $numeratorUnits, $denominatorUnits ) : string | Returns a string representation of the units. |
Method | Description | |
---|---|---|
areConvertable ( array $units ) : boolean | Returns a value indicating if all the units are capable of being converted | |
coercionFactor ( array $fromUnits, array $toUnits ) : float | Calculates the corecion factor to apply to the value | |
convert ( SassNumber $other ) : SassNumber | Converts values and units. | |
removeCommonUnits ( array $u1, array $u2 ) : array | Removes common units from each set. |
public __construct ( $value ) : SassNumber | ||
return | SassNumber |
public getDenominatorUnits ( ) : string | ||
return | string | the denominator units of this number |
public getNumeratorUnits ( ) : string | ||
return | string | the numerator units of this number |
public hasLegalUnits ( ) : boolean | ||
return | boolean | true if this number has units that can be represented in CSS, false if not |
public isComparableTo ( $other ) : boolean | ||
return | boolean | true if this number can be compared to other, false if not |
public isUnitless ( ) : boolean | ||
return | boolean | true if this number is unitless, false if not |
public nth ( $i ) : SassBoolean | SassNumber | ||
return | SassBoolean | SassNumber |
public op_eq ( $other ) : SassBoolean | ||
return | SassBoolean | SassBoolean object with the value true if the values of this and other are equal, false if they are not |
public op_gt ( sassLiteral $other ) : SassBoolean | ||
$other | sassLiteral | the value to compare to this |
return | SassBoolean | SassBoolean object with the value true if the values of this is greater than the value of other, false if it is not |
public op_gte ( sassLiteral $other ) : SassBoolean | ||
$other | sassLiteral | the value to compare to this |
return | SassBoolean | SassBoolean object with the value true if the values of this is greater than or equal to the value of other, false if it is not |
public op_lt ( sassLiteral $other ) : SassBoolean | ||
$other | sassLiteral | the value to compare to this |
return | SassBoolean | SassBoolean object with the value true if the values of this is less than the value of other, false if it is not |
public op_lte ( sassLiteral $other ) : SassBoolean | ||
$other | sassLiteral | the value to compare to this |
return | SassBoolean | SassBoolean object with the value true if the values of this is less than or equal to the value of other, false if it is not |
public op_unary_minus ( ) : SassNumber | ||
return | SassNumber | the negative value of this number |
public op_unary_plus ( ) : SassNumber | ||
return | SassNumber | the value of this number |
public unitString ( $numeratorUnits, $denominatorUnits ) : string | ||
return | string | the units |