1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-25 15:49:06 +02:00

extremeties

This commit is contained in:
Pomax
2020-08-17 08:02:29 -07:00
parent 837fdbe187
commit d39b4ed446
10 changed files with 268 additions and 82 deletions

View File

@@ -258,6 +258,20 @@ class GraphicsAPI extends BaseAPI {
this.ctx.lineWidth = `${width}px`;
}
/**
* Cache all styling values
*/
cacheStyle() {
this.ctx.cacheStyle();
}
/**
* restore all previous styling values
*/
restoreStyle() {
this.ctx.restoreStyle();
}
/**
* Reset the canvas bitmap to a uniform color.
*/
@@ -493,6 +507,14 @@ class GraphicsAPI extends BaseAPI {
return Math.abs(v);
}
min(...v) {
return Math.min(...v);
}
max(...v) {
return Math.max(...v);
}
sin(v) {
return Math.sin(v);
}