Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
05a3862e30 | |||
37ca7b1e2d | |||
680c863ce1 | |||
209d4fc7c5 | |||
51769e1b12 | |||
c32edbd4cb | |||
a175e86db7 | |||
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"
|
62
CHANGELOG.md
62
CHANGELOG.md
@ -1,17 +1,69 @@
|
||||
# Changelog
|
||||
|
||||
<!-- vim-markdown-toc GFM -->
|
||||
|
||||
* [3.4.1](#341)
|
||||
* [3.4](#34)
|
||||
* [3.3](#33)
|
||||
* [3.2](#32)
|
||||
* [3.1](#31)
|
||||
* [3.0](#30)
|
||||
* [Major changes](#major-changes)
|
||||
* [Patch changes](#patch-changes)
|
||||
* [2.2](#22)
|
||||
* [2.1.1](#211)
|
||||
* [2.1](#21)
|
||||
* [2.0.1](#201)
|
||||
* [2.0](#20)
|
||||
* [Major changes](#major-changes-1)
|
||||
* [Minor changes](#minor-changes)
|
||||
* [1.0](#10)
|
||||
* [Major changes](#major-changes-2)
|
||||
* [Minor changes](#minor-changes-1)
|
||||
* [Patch changes](#patch-changes-1)
|
||||
* [0.2.3](#023)
|
||||
* [0.2.2](#022)
|
||||
* [0.2.1](#021)
|
||||
* [0.2](#02)
|
||||
* [0.1.1](#011)
|
||||
* [0.1](#01)
|
||||
|
||||
<!-- vim-markdown-toc -->
|
||||
|
||||
# 3.4.1
|
||||
|
||||
> Sep 05th, 2020
|
||||
|
||||
- Support of `simba-0.2`.
|
||||
- Support of `nalgebra-0.22`.
|
||||
|
||||
# 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 +76,7 @@
|
||||
|
||||
- Fix Bézier interpolation when the next key is Bézier too.
|
||||
|
||||
# 2.2.0
|
||||
# 2.2
|
||||
|
||||
> Mon Oct 17th 2019
|
||||
|
||||
@ -52,7 +104,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.1"
|
||||
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, <0.23", 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, <0.3", 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