10/30/2017

C++ Eigen::Vector3f a * 0.01 is not the same as a / 100.0

This is very weird, but take a look at the following tests:
  point_cloud::Point point;
  point.set_x(19502);
  point.set_y(-12092.632);
  point.set_z(259.90189);

  Eigen::Vector3f point_meter =
      Eigen::Vector3f(point.x() * 0.01, point.y() * 0.01, point.z() * 0.01);
  Eigen::Vector3f point_centimeter = Eigen::Vector3f(
      point_meter.x() * 100, point_meter.y() * 100, point_meter.z() * 100);
  EXPECT_EQ(point.x(), point_centimeter.x());
  EXPECT_EQ(point.y(), point_centimeter.y());
  EXPECT_EQ(point.z(), point_centimeter.z());

  Eigen::Vector3f from_proto = Eigen::Vector3f(point.x(), point.y(), point.z());
  EXPECT_EQ(point.x(), from_proto.x());
  EXPECT_EQ(point.y(), from_proto.y());
  EXPECT_EQ(point.z(), from_proto.z());

  point_meter = from_proto * 0.01;
  point_centimeter = point_meter * 100;
  EXPECT_EQ(point.x(), point_centimeter.x());  // Failed. WHY??
  EXPECT_EQ(point.y(), point_centimeter.y());
  EXPECT_EQ(point.z(), point_centimeter.z());


If I used from_proto / 100, then the test works.

10/02/2017

Best browser add-ons/addons/plugins/extensions, Firefox, Chrome, Microsoft Edge

Microsoft Edge: 
  - Ebates, online shopping
  - MultiLogin
  - Fast Tab Switcher
  - SwitchyOmega
  - Tabliss
  - Block site
  - Enhancer for YouTube
  - Previous Tab
  - Alt number to switch tabs: https://github.com/Wsine/AltNumberTab (git clone the repo and load unpacked extension)















Firefox:
  - Ebates, online shopping
  - Simple Translate, website translator
  - Proxy Switcher, Define proxy server for each protocol
  - Quick Tab Switcher
  - Tabliss
  - Stylebot
  - Block site
  - Enhancer for YouTube
  - https://addons.mozilla.org/en-US/firefox/addon/alt-number-to-switch-tabs/ 
  - Most Recent Tab