Valid.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_MATH_VALID_H
#define SURGSIM_MATH_VALID_H
#include <math.h>
#include <Eigen/Core>
#include <Eigen/Geometry>
namespace SurgSim
{
namespace Math
{
inline bool isValid(float value);
inline bool isValid(double value);
template <typename T>
inline bool isValid(const Eigen::DenseBase<T>& value);
template <typename T>
inline bool isValid(const Eigen::QuaternionBase<T>& value);
template <typename T>
inline bool isValid(const Eigen::AngleAxis<T>& value);
template <typename T>
inline bool isValid(const Eigen::Rotation2D<T>& value);
template <typename T, int D, int M, int O>
inline bool isValid(const Eigen::Transform<T, D, M, O>& value);
inline bool isSubnormal(float value);
inline bool isSubnormal(double value);
template <typename T>
inline bool isSubnormal(const Eigen::DenseBase<T>& value);
template <typename T>
inline bool isSubnormal(const Eigen::QuaternionBase<T>& value);
template <typename T>
inline bool isSubnormal(const Eigen::AngleAxis<T>& value);
template <typename T>
inline bool isSubnormal(const Eigen::Rotation2D<T>& value);
template <typename T, int D, int M, int O>
inline bool isSubnormal(const Eigen::Transform<T, D, M, O>& value);
inline bool setSubnormalToZero(float* value);
inline bool setSubnormalToZero(double* value);
template <typename T>
inline bool setSubnormalToZero(Eigen::DenseBase<T>* value);
template <typename T>
inline bool setSubnormalToZero(Eigen::QuaternionBase<T>* value);
template <typename T>
inline bool setSubnormalToZero(Eigen::AngleAxis<T>* value);
template <typename T>
inline bool setSubnormalToZero(Eigen::Rotation2D<T>* value);
template <typename T, int D, int M, int O>
inline bool setSubnormalToZero(Eigen::Transform<T, D, M, O>* value);
}; // namespace Math
}; // namespace SurgSim
#include "SurgSim/Math/Valid-inl.h"
#endif // SURGSIM_MATH_VALID_H
SurgSim::Math::isSubnormal
bool isSubnormal(float value)
Check if a float value is subnormal.
Definition: Valid-inl.h:142
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
Valid-inl.h
Implementation of isValid(), isSubnormal() and setSubnormalToZero().
SurgSim::Math::setSubnormalToZero
bool setSubnormalToZero(float *value)
If the float value is subnormal, set it to zero.
Definition: Valid-inl.h:188
SurgSim::Math::isValid
bool isValid(float value)
Check if a float value is valid.
Definition: Valid-inl.h:98