QueryCurve
This tool allows you to invoke queries against a curve you've laid out at https://querycurve.com
Once you have a curve in the shape you'd like:
You'll get a resulting encoded curve that'll look like this:
2BLnMW-2BLnMW--KyjA--KyjA-0-KyjA-CaR6-XZAG-KyjA-TN1E-KyjA-KyjA-KyjA-CaR6-TN1E-8OI4-fxSK-KyjA
Time to query!
Installation
Add query-curve to your Cargo.toml dependencies:
[]
= "0.1.0"
Then run:
Usage
use query_encoded_curve;
Querying with a dynamically loaded curve
If you are pulling your curve from a db or otherwise need it to be dynamic:
use query_encoded_curve;
Note: While decoding the curve is fast, repeatedly querying against the same curve can be optimized by preloading the curve. If you anticipate multiple queries against the same curve, consider using:
Querying with a preloaded or reused curve
If the curve you're using will be used to facilitate multiple queries, this alternative for querying will bypass the need to decode the curve on every query.
use get_encoded_curve_query_function;
Features
- Efficient Querying: Quickly find the y value for any given x on your custom Bezier curve.
- Preloading Curves: Optimize performance by preloading and reusing decoded curves for multiple queries.
- Integration with QueryCurve.com: Seamlessly use curves designed with QueryCurve.com.
Documentation
Full documentation is available at docs.rs/query-curve.
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue.
License
This project is licensed under the MIT License - see the LICENSE file for details.