small_gicp
include
small_gicp
util
fast_floor.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright 2024 Kenji Koide
2
// SPDX-License-Identifier: MIT
3
#pragma once
4
5
#include <Eigen/Core>
6
7
namespace
small_gicp
{
8
12
inline
Eigen::Array4i
fast_floor
(
const
Eigen::Array4d& pt) {
13
const
Eigen::Array4i ncoord = pt.cast<
int
>();
14
return
ncoord - (pt < ncoord.cast<
double
>()).cast<
int
>();
15
};
16
17
}
// namespace small_gicp
small_gicp
Definition:
flat_container.hpp:12
small_gicp::fast_floor
Eigen::Array4i fast_floor(const Eigen::Array4d &pt)
Fast floor (https://stackoverflow.com/questions/824118/why-is-floor-so-slow).
Definition:
fast_floor.hpp:12
Generated by
1.9.1