We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 278d119 commit b74591dCopy full SHA for b74591d
src/Byte.php
@@ -240,6 +240,20 @@ public function equalTo(self|int|float|string $operand): bool
240
return self::parse($operand) == $this->value;
241
}
242
243
+ public function divide(self|int|float|string $value): self
244
+ {
245
+ if (($value = self::parse($value)) > $this->value) {
246
+ throw new \LogicException('[$value] can not be greater than '. $this->value);
247
+ }
248
+
249
+ return new self($this->value - $value);
250
251
252
+ public function multiply(self|int|float|string $value): self
253
254
+ return new self($this->value * $value);
255
256
257
/**
258
* @param Byte|int|float|string $operand
259
* @return bool
0 commit comments