mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
It makes sense to simplify these ahead of time.
This commit is contained in:
parent
aceb7e3b6b
commit
ec55a25620
@ -179,8 +179,10 @@ void Controller::end_writing()
|
|||||||
void Controller::set_expected_bit_length(Time bit_length)
|
void Controller::set_expected_bit_length(Time bit_length)
|
||||||
{
|
{
|
||||||
bit_length_ = bit_length;
|
bit_length_ = bit_length;
|
||||||
|
bit_length_.simplify();
|
||||||
|
|
||||||
cycles_per_bit_ = Storage::Time(8000000) * (bit_length * rotational_multiplier_);
|
cycles_per_bit_ = Storage::Time(8000000) * (bit_length * rotational_multiplier_);
|
||||||
|
cycles_per_bit_.simplify();
|
||||||
|
|
||||||
// this conversion doesn't need to be exact because there's a lot of variation to be taken
|
// this conversion doesn't need to be exact because there's a lot of variation to be taken
|
||||||
// account of in rotation speed, air turbulence, etc, so a direct conversion will do
|
// account of in rotation speed, air turbulence, etc, so a direct conversion will do
|
||||||
|
Loading…
Reference in New Issue
Block a user