com.flash3388.flashlib.io.devices.RangeFinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flashlib.core.io Show documentation
Show all versions of flashlib.core.io Show documentation
Robotics development framework (flashlib.core.io)
The newest version!
package com.flash3388.flashlib.io.devices;
import java.io.Closeable;
import java.util.function.DoubleSupplier;
/**
* Interface for range finder sensors. Range finders are sensors used to measure distances between
* them and an object in front of them. There are several ways range finders measure distances, for example: sound waves,
* infrared, etc.
*
* @since FlashLib 1.0.0
*/
public interface RangeFinder extends Closeable, DoubleSupplier {
/**
* Gets the distance measured by the sensor in centimeters.
*
* @return distance by centimeters
*/
double getRangeCm();
/**
* {@inheritDoc}
*
* Returns the value of {@link #getRangeCm()}.
*/
@Override
default double getAsDouble() {
return getRangeCm();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy