/** * Compares with another dimension * * @param Node $other * @return integer */ public function compare(Node $other) { if (!$other instanceof DimensionNode) { return null; } if ($this->unit->isEmpty() || $other->unit->isEmpty()) { $a = $this; $b = $other; } else { $a = $this->unify(); $b = $other->unify(); if ($a->unit->compare($b->unit) !== 0) { return null; } } return Util::numericCompare($a->value, $b->value); }