mirror of
https://github.com/lisk77/comet.git
synced 2025-10-24 13:58:49 +00:00
docs(math): added more documentation for bezier, matrix, noise, point, polynomial, quaternion and vector
This commit is contained in:
parent
30c6327997
commit
5f97d3a881
8 changed files with 399 additions and 239 deletions
|
|
@ -1,11 +1,13 @@
|
|||
use crate::{InnerSpace, Point};
|
||||
|
||||
/// Representation of a Bezier curve of degree n in any (2-4) dimensions.
|
||||
pub struct Bezier<V: InnerSpace> {
|
||||
points: Vec<V>,
|
||||
degree: usize,
|
||||
}
|
||||
|
||||
impl<V: InnerSpace + Clone> Bezier<V> {
|
||||
/// Creates a new Bezier curve with the given control points.
|
||||
pub fn new(points: Vec<V>) -> Self {
|
||||
let degree = points.len() - 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue