mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Replaced floats with doubles (#355)
This makes our APIs more consistent. With optimizations enabled, doubles are just as efficient as floats on ARMv7, so we should take advantage of the extra precision.
This commit is contained in:
committed by
Peter Johnson
parent
7bcd243ec3
commit
69422dc063
@@ -24,7 +24,7 @@ namespace frc {
|
||||
class SimContinuousOutput {
|
||||
private:
|
||||
gazebo::transport::PublisherPtr pub;
|
||||
float speed;
|
||||
double speed;
|
||||
|
||||
public:
|
||||
explicit SimContinuousOutput(std::string topic);
|
||||
@@ -37,12 +37,12 @@ class SimContinuousOutput {
|
||||
*
|
||||
* @param value The value between -1.0 and 1.0 to set.
|
||||
*/
|
||||
void Set(float value);
|
||||
void Set(double value);
|
||||
|
||||
/**
|
||||
* @return The most recently set value.
|
||||
*/
|
||||
float Get();
|
||||
double Get();
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user