Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
ebfc15d8af | |||
5b92d7b715 | |||
8f7cc9e711 | |||
9d930d6f16 | |||
0afebc3319 | |||
4a2f349954 | |||
85ac489636 | |||
aea9011296 | |||
04247d8706 |
12
.dependabot/config.yml
Normal file
12
.dependabot/config.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: 1
|
||||
update_configs:
|
||||
- package_manager: "rust:cargo"
|
||||
directory: "."
|
||||
update_schedule: "live"
|
||||
target_branch: "master"
|
||||
default_reviewers:
|
||||
- "phaazon"
|
||||
default_assignees:
|
||||
- "phaazon"
|
||||
default_labels:
|
||||
- "dependency-update"
|
23
CHANGELOG.md
23
CHANGELOG.md
@ -1,17 +1,30 @@
|
||||
# 3.4
|
||||
|
||||
> Thu May 21st 2020
|
||||
|
||||
- Add support for `float-cmp-0.7` and `float-cmp-0.8`. Because this uses a SemVer range, if you
|
||||
already have a `Cargo.lock`, don’t forget to update `splines` with `cargo update --aggressive`.
|
||||
|
||||
# 3.3
|
||||
|
||||
> Thu Apr 10th 2020
|
||||
|
||||
- Add support for `nalgebra-0.21`.
|
||||
|
||||
# 3.2
|
||||
|
||||
> Thu Mar 19th 2020
|
||||
> Thu Mar 19th 2020
|
||||
|
||||
- Add support for `nalgebra-0.20`.
|
||||
- Add support for `float-cmp-0.6`.
|
||||
|
||||
# 3.1.0
|
||||
# 3.1
|
||||
|
||||
> Sat Jan 26th 2020
|
||||
|
||||
- Add support for `nalgebra-0.19`.
|
||||
|
||||
# 3.0.0
|
||||
# 3.0
|
||||
|
||||
> Tue Oct 22th 2019
|
||||
|
||||
@ -24,7 +37,7 @@
|
||||
|
||||
- Fix Bézier interpolation when the next key is Bézier too.
|
||||
|
||||
# 2.2.0
|
||||
# 2.2
|
||||
|
||||
> Mon Oct 17th 2019
|
||||
|
||||
@ -52,7 +65,7 @@
|
||||
- Fix the cubic Bézier curve interpolation. The “output” tangent is now taken by mirroring the
|
||||
next key’s tangent around its control point.
|
||||
|
||||
# 2.0.0
|
||||
# 2.0
|
||||
|
||||
> Mon Sep 23rd 2019
|
||||
|
||||
|
10
Cargo.toml
10
Cargo.toml
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "splines"
|
||||
version = "3.2.0"
|
||||
version = "3.4.0"
|
||||
license = "BSD-3-Clause"
|
||||
authors = ["Dimitri Sabadie <dimitri.sabadie@gmail.com>"]
|
||||
description = "Spline interpolation made easy"
|
||||
@ -22,20 +22,20 @@ maintenance = { status = "actively-developed" }
|
||||
[features]
|
||||
default = ["std"]
|
||||
impl-cgmath = ["cgmath"]
|
||||
impl-nalgebra = ["alga", "nalgebra", "num-traits"]
|
||||
impl-nalgebra = ["nalgebra", "num-traits", "simba"]
|
||||
serialization = ["serde", "serde_derive"]
|
||||
std = []
|
||||
|
||||
[dependencies]
|
||||
alga = { version = "0.9", optional = true }
|
||||
cgmath = { version = "0.17", optional = true }
|
||||
nalgebra = { version = "0.20", optional = true }
|
||||
nalgebra = { version = "0.21", optional = true }
|
||||
num-traits = { version = "0.2", optional = true }
|
||||
serde = { version = "1", optional = true }
|
||||
serde_derive = { version = "1", optional = true }
|
||||
simba = { version = "0.1.2", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
float-cmp = "0.6"
|
||||
float-cmp = ">=0.6, < 0.9"
|
||||
serde_json = "1"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
|
@ -24,7 +24,7 @@ is picked from its lower control point.
|
||||
|
||||
# Quickly create splines
|
||||
|
||||
```
|
||||
```rust
|
||||
use splines::{Interpolation, Key, Spline};
|
||||
|
||||
let start = Key::new(0., 0., Interpolation::Linear);
|
||||
@ -46,7 +46,7 @@ value.
|
||||
|
||||
If you try to sample in out-of-bounds sampling parameter, you’ll get no value.
|
||||
|
||||
```
|
||||
```rust
|
||||
assert_eq!(spline.sample(0.), Some(0.));
|
||||
assert_eq!(spline.clamped_sample(1.), Some(10.));
|
||||
assert_eq!(spline.sample(1.1), None);
|
||||
@ -56,7 +56,7 @@ It’s possible that you want to get a value even if you’re out-of-bounds. Thi
|
||||
important for simulations / animations. Feel free to use the `Spline::clamped_interpolation` for
|
||||
that purpose.
|
||||
|
||||
```
|
||||
```rust
|
||||
assert_eq!(spline.clamped_sample(-0.9), Some(0.)); // clamped to the first key
|
||||
assert_eq!(spline.clamped_sample(1.1), Some(10.)); // clamped to the last key
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
use alga::general::{ClosedAdd, ClosedDiv, ClosedMul, ClosedSub};
|
||||
use nalgebra::{Scalar, Vector, Vector1, Vector2, Vector3, Vector4, Vector5, Vector6};
|
||||
use num_traits as nt;
|
||||
use simba::scalar::{ClosedAdd, ClosedDiv, ClosedMul, ClosedSub};
|
||||
use std::ops::Mul;
|
||||
|
||||
use crate::interpolate::{
|
||||
|
Reference in New Issue
Block a user