Compare commits
10 Commits
4.1.1
...
EmbarkStud
Author | SHA1 | Date | |
---|---|---|---|
da43539b70 | |||
eca09f1baf | |||
e1b78070c6 | |||
cdc48a49a7 | |||
decd85dba2 | |||
df9815a464 | |||
ca8e797932 | |||
5b746aaf57 | |||
88a7ee7a8d | |||
5463fd11d6 |
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,7 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
<!-- vim-markdown-toc GFM -->
|
* [4.1.2](#412)
|
||||||
|
|
||||||
* [4.1.1](#411)
|
* [4.1.1](#411)
|
||||||
* [4.1](#41)
|
* [4.1](#41)
|
||||||
* [4.0.3](#403)
|
* [4.0.3](#403)
|
||||||
@ -42,13 +41,20 @@
|
|||||||
* [0.1.1](#011)
|
* [0.1.1](#011)
|
||||||
* [0.1](#01)
|
* [0.1](#01)
|
||||||
|
|
||||||
<!-- vim-markdown-toc -->
|
# 4.2.0
|
||||||
|
|
||||||
|
> Feb 1, 2023
|
||||||
|
|
||||||
|
- Add support for `glam-0.22`.
|
||||||
|
- Add support for `nalgebra-0.32`.
|
||||||
|
- Add deprecation lints for `impl-*` feature gates. Those shouldn’t be used anymore and the `*` variant should be
|
||||||
|
preferred. For instance, if you used `impl-cgmath`, you should just use the `cgmath` feature gate now.
|
||||||
|
|
||||||
# 4.1.1
|
# 4.1.1
|
||||||
|
|
||||||
> Jul 27, 2022
|
> Jul 27, 2022
|
||||||
|
|
||||||
- Internal enhancement of sampling splines by looking for control points. That brings the lookup from _O(1)_ to
|
- Internal enhancement of sampling splines by looking for control points. That brings the lookup from _O(N)_ to
|
||||||
_O(log(N))_. That is super embarassing because it should have been the default from the very first commit. Sorry
|
_O(log(N))_. That is super embarassing because it should have been the default from the very first commit. Sorry
|
||||||
about that.
|
about that.
|
||||||
- Fix hermite cubic interpolation.
|
- Fix hermite cubic interpolation.
|
||||||
|
14
Cargo.toml
14
Cargo.toml
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "splines"
|
name = "splines"
|
||||||
version = "4.1.1"
|
version = "4.2.0"
|
||||||
license = "BSD-3-Clause"
|
license = "BSD-3-Clause"
|
||||||
authors = ["Dimitri Sabadie <dimitri.sabadie@gmail.com>"]
|
authors = ["Dimitri Sabadie <dimitri.sabadie@gmail.com>"]
|
||||||
description = "Spline interpolation made easy"
|
description = "Spline interpolation made easy"
|
||||||
@ -13,12 +13,6 @@ readme = "README.md"
|
|||||||
|
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[badges]
|
|
||||||
travis-ci = { repository = "phaazon/splines", branch = "master" }
|
|
||||||
is-it-maintained-issue-resolution = { repository = "phaazon/splines" }
|
|
||||||
is-it-maintained-open-issues = { repository = "phaazon/splines" }
|
|
||||||
maintenance = { status = "actively-developed" }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
impl-cgmath = ["cgmath"]
|
impl-cgmath = ["cgmath"]
|
||||||
@ -29,8 +23,8 @@ std = []
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cgmath = { version = ">=0.17, <0.19", optional = true }
|
cgmath = { version = ">=0.17, <0.19", optional = true }
|
||||||
glam = { version = ">=0.10, <0.22", optional = true }
|
glam = { version = ">=0.10, <0.25", optional = true }
|
||||||
nalgebra = { version = ">=0.21, <0.32", optional = true }
|
nalgebra = { version = ">=0.21, <0.33", optional = true }
|
||||||
serde = { version = "1", features = ["derive"], optional = true }
|
serde = { version = "1", features = ["derive"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
@ -38,7 +32,7 @@ float-cmp = ">=0.6, < 0.10"
|
|||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
features = ["std", "cgmath", "glam", "nalgebra", "serde"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "hello-world"
|
name = "hello-world"
|
||||||
|
11
src/lib.rs
11
src/lib.rs
@ -108,6 +108,17 @@
|
|||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
#![cfg_attr(not(feature = "std"), feature(alloc))]
|
#![cfg_attr(not(feature = "std"), feature(alloc))]
|
||||||
#![cfg_attr(not(feature = "std"), feature(core_intrinsics))]
|
#![cfg_attr(not(feature = "std"), feature(core_intrinsics))]
|
||||||
|
#![cfg_attr(
|
||||||
|
any(
|
||||||
|
feature = "impl-cgmath",
|
||||||
|
feature = "impl-glam",
|
||||||
|
feature = "impl-nalgebra"
|
||||||
|
),
|
||||||
|
deprecated(
|
||||||
|
since = "4.2.0",
|
||||||
|
note = "you are using an impl-* feature gate; please switch to * (e.g. impl-cgmath becomes cgmath)"
|
||||||
|
)
|
||||||
|
)]
|
||||||
|
|
||||||
#[cfg(not(feature = "std"))]
|
#[cfg(not(feature = "std"))]
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
@ -56,6 +56,13 @@ impl<T, V> Spline<T, V> {
|
|||||||
spline
|
spline
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Clear the spline by removing all keys. Keeps the underlying allocated storage, so adding
|
||||||
|
/// new keys should be faster than creating a new [`Spline`]
|
||||||
|
#[inline]
|
||||||
|
pub fn clear(&mut self) {
|
||||||
|
self.0.clear()
|
||||||
|
}
|
||||||
|
|
||||||
/// Create a new spline by consuming an `Iterater<Item = Key<T>>`. They keys don’t have to be
|
/// Create a new spline by consuming an `Iterater<Item = Key<T>>`. They keys don’t have to be
|
||||||
/// sorted.
|
/// sorted.
|
||||||
///
|
///
|
||||||
|
Reference in New Issue
Block a user