Skip to content

Commit 774f021

Browse files
committed
- make generic trig and log functions, sweep through lib.rs comments and add code fomatting to function parameters in comments
1 parent ff5b0e0 commit 774f021

File tree

5 files changed

+288
-131
lines changed

5 files changed

+288
-131
lines changed

readme.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,16 @@ let f = smoothstep(5.0, 1.0, f);
195195

196196
These functions are availble for all floating point scalar or vector types: `cos, sin, tan, acos, asin, atan, cosh, sinh, tanh, sin_cos, atan2, exp, exp2, log2, log10`.
197197

198-
They do not have generic implementations as they are not as commonly used, you can access them like so:
199-
200198
```rust
201-
let s = Vec3f::sin(x);
202-
let x = Vec3f::cos(y);
203-
let f = f32::acos(x);
204-
let d = f64::atan2(y, x);
205-
let l = f32::log2(x);
199+
// trig functions
200+
let s = sin(vec2);
201+
let x = cos(vec3);
202+
let f = acos(x);
203+
let d = atan2(y, x);
204+
205+
// exp / log
206+
let d = exp(y);
207+
let l = log2(x);
206208
```
207209

208210
### Functions

0 commit comments

Comments
 (0)