Commit Graph

9 Commits

Author SHA1 Message Date
Dan Kortschak
2600994ee4 spatial/r3: add method to obtain a rotation matrix 2021-06-21 16:56:18 +09:30
Dan Kortschak
f2a128f642 spatial/{r2,r3}: fix/clarify doc comments 2021-06-20 16:45:59 +09:30
Sebastien Binet
3199e478a1 spatial/r3: harmonize Vec API with num/quat.Number
Migration to the new API can be achieved with this rsc.io/rf script:

```
rf ex {
	import "gonum.org/v1/gonum/spatial/r3";
	var p,q r3.Vec;
	var f float64;

	p.Add(q) -> r3.Add(p, q);
	p.Sub(q) -> r3.Sub(p, q);
	p.Scale(f) -> r3.Scale(f, p);
	p.Dot(q) -> r3.Dot(p, q);
	p.Cross(q) -> r3.Cross(p, q);
	p.Rotate(f, q) -> r3.Rotate(p, f, q);
}
```

Updates gonum/gonum#1553.
2021-01-29 12:39:42 +01:00
Sebastien Binet
9c06200335 spatial/r3: implement Rotate
Updates gonum/gonum#1513.
2020-12-01 10:52:18 +01:00
Sebastien Binet
448e2b6d0e spatial/{r2,r3}: add Cos, Unit 2020-04-08 12:28:23 +02:00
Sebastien Binet
962425fcd9 spatial/r{2,3}: add Norm and Norm2 2020-04-01 11:26:45 +02:00
Sebastien Binet
e98ce15ff2 spatial/r3: implement Vec.Cross 2020-03-30 13:18:30 +02:00
Sebastien Binet
2321f504d0 spatial/r3: implement Vec.Dot 2020-03-30 13:18:30 +02:00
Dan Kortschak
4a2eb0188c spatial/barneshut: add Barnes-Hut force approximation package and R2/R3 helpers 2019-05-03 06:57:12 +09:30