public function testNaiveDivide() { $unit = new UnitComposition(); $thrust = new Force(1000, $unit); $mass = new Mass(1000, $unit); /** @var Acceleration $acceleration */ $acceleration = $unit->naiveDivide($thrust, $mass); $this->assertInstanceOf('Samsara\\PHPhysics\\Units\\Acceleration', $acceleration); $this->assertEquals('1', $acceleration->getValue()); }
public function divideBy(Quantity $quantity, $precision = 2) { return $this->unitCompClass->naiveDivide($this, $quantity, $precision); }