MCPcopy Create free account
hub / github.com/DjDeveloperr/deno_desktop / Deg

Class Deg

examples/extern/gmath.bundle.js:85–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84}
85class Deg extends Angle {
86 static turn = 360;
87 sin() {
88 return this.toRad().sin();
89 }
90 cos() {
91 return this.toRad().cos();
92 }
93 tan() {
94 return this.toRad().tan();
95 }
96 sincos() {
97 return this.toRad().sincos();
98 }
99 csc() {
100 return this.toRad().csc();
101 }
102 cot() {
103 return this.toRad().cot();
104 }
105 sec() {
106 return this.toRad().sec();
107 }
108 asin() {
109 return this.toRad().asin();
110 }
111 acos() {
112 return this.toRad().acos();
113 }
114 atan() {
115 return this.toRad().atan();
116 }
117 add(other) {
118 const value = other instanceof Angle ? other.toDeg().value : other;
119 return new Deg(this.value + value);
120 }
121 sub(other) {
122 const value = other instanceof Angle ? other.toDeg().value : other;
123 return new Deg(this.value - value);
124 }
125 mul(other) {
126 const value = other instanceof Angle ? other.toDeg().value : other;
127 return new Deg(this.value * value);
128 }
129 div(other) {
130 const value = other instanceof Angle ? other.toDeg().value : other;
131 return new Deg(this.value / value);
132 }
133 neg() {
134 return new Deg(-this.value);
135 }
136 eq(other) {
137 const value = other instanceof Angle ? other.toDeg().value : other;
138 return this.value === value;
139 }
140 normal() {
141 const rem = this.value % Deg.turn;
142 return new Deg(rem < 0 ? rem + Deg.turn : rem);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected