@@ -222,6 +222,154 @@ namespace steppable::__internals::arithmetic
222
222
*/
223
223
std::string factorial (const std::string& _number, int steps = 2 );
224
224
225
+ /* *
226
+ * @brief Converts degrees to radians.
227
+ *
228
+ * @param _deg The angle expressed in degrees.
229
+ * @return The equivalent angle in radians.
230
+ */
231
+ std::string degToRad (const std::string& _deg);
232
+
233
+ /* *
234
+ * @brief Converts gradians to radians.
235
+ *
236
+ * @param _grad The angle expressed in gradians.
237
+ * @return The equivalent angle in radians.
238
+ */
239
+ std::string gradToRad (const std::string& _grad);
240
+
241
+ /* *
242
+ * @brief Calculates the cosine of a number.
243
+ *
244
+ * @param x The number to calculate the cosine of.
245
+ * @param decimals The number of decimal places to round off to.
246
+ * @param mode The mode to calculate the cosine in. 0 = radians (default), 1 = degrees, 2 = gradians.
247
+ *
248
+ * @return The cosine of the number.
249
+ */
250
+ std::string cos (const std::string& x, int decimals, int mode = 0 );
251
+
252
+ /* *
253
+ * @brief Calculates the sine of a number.
254
+ *
255
+ * @param x The number to calculate the sine of.
256
+ * @param decimals The number of decimal places to round off to.
257
+ * @param mode The mode to calculate the sine in. 0 = radians (default), 1 = degrees, 2 = gradians.
258
+ *
259
+ * @return The sine of the number.
260
+ */
261
+ std::string sin (const std::string& x, int decimals, int mode = 0 );
262
+
263
+ /* *
264
+ * @brief Calculates the tangent of a number.
265
+ *
266
+ * @param x The number to calculate the tangent of.
267
+ * @param decimals The number of decimal places to round off to.
268
+ * @param mode The mode to calculate the tangent in. 0 = radians (default), 1 = degrees, 2 = gradians.
269
+ *
270
+ * @return The tangent of the number.
271
+ */
272
+ std::string tan (const std::string& x, int decimals, int mode = 0 );
273
+
274
+ /* *
275
+ * @brief Calculates the secant of a number.
276
+ *
277
+ * @param x The number to calculate the secant of.
278
+ * @param decimals The number of decimal places to round off to.
279
+ * @param mode The mode to calculate the secant in. 0 = radians (default), 1 = degrees, 2 = gradians.
280
+ *
281
+ * @return The secant of the number.
282
+ */
283
+ std::string sec (const std::string& x, int decimals, int mode = 0 );
284
+
285
+ /* *
286
+ * @brief Calculates the cosecant of a number.
287
+ *
288
+ * @param x The number to calculate the cosecant of.
289
+ * @param decimals The number of decimal places to round off to.
290
+ * @param mode The mode to calculate the cosecant in. 0 = radians (default), 1 = degrees, 2 = gradians.
291
+ *
292
+ * @return The cosecant of the number.
293
+ */
294
+ std::string csc (const std::string& x, int decimals, int mode = 0 );
295
+
296
+ /* *
297
+ * @brief Calculates the cotangent of a number.
298
+ *
299
+ * @param x The number to calculate the cotangent of.
300
+ * @param decimals The number of decimal places to round off to.
301
+ * @param mode The mode to calculate the cotangent in. 0 = radians (default), 1 = degrees, 2 = gradians.
302
+ *
303
+ * @return The cotangent of the number.
304
+ */
305
+ std::string cot (const std::string& x, int decimals, int mode = 0 );
306
+
307
+ /* *
308
+ * @brief Calculates the arc cosine of a number.
309
+ *
310
+ * @param x The number to calculate the arc cosine of.
311
+ * @param decimals The number of decimal places to round off to.
312
+ * @param mode The mode to calculate the arc cosine in. 0 = radians (default), 1 = degrees, 2 = gradians.
313
+ *
314
+ * @return The arc cosine of the number.
315
+ */
316
+ std::string acos (const std::string& x, int decimals, int mode = 0 );
317
+
318
+ /* *
319
+ * @brief Calculates the arc sine of a number.
320
+ *
321
+ * @param x The number to calculate the arc sine of.
322
+ * @param decimals The number of decimal places to round off to.
323
+ * @param mode The mode to calculate the arc sine in. 0 = radians (default), 1 = degrees, 2 = gradians.
324
+ *
325
+ * @return The arc sine of the number.
326
+ */
327
+ std::string asin (const std::string& x, int decimals, int mode = 0 );
328
+
329
+ /* *
330
+ * @brief Calculates the arc tangent of a number.
331
+ *
332
+ * @param x The number to calculate the arc tangent of.
333
+ * @param decimals The number of decimal places to round off to.
334
+ * @param mode The mode to calculate the arc tangent in. 0 = radians (default), 1 = degrees, 2 = gradians.
335
+ *
336
+ * @return The arc tangent of the number.
337
+ */
338
+ std::string atan (const std::string& x, int decimals, int mode = 0 );
339
+
340
+ /* *
341
+ * @brief Calculates the arc secant of a number.
342
+ *
343
+ * @param x The number to calculate the arc secant of.
344
+ * @param decimals The number of decimal places to round off to.
345
+ * @param mode The mode to calculate the arc secant in. 0 = radians (default), 1 = degrees, 2 = gradians.
346
+ *
347
+ * @return The arc secant of the number.
348
+ */
349
+ std::string asec (const std::string& x, int decimals, int mode = 0 );
350
+
351
+ /* *
352
+ * @brief Calculates the arc cosecant of a number.
353
+ *
354
+ * @param x The number to calculate the arc cosecant of.
355
+ * @param decimals The number of decimal places to round off to.
356
+ * @param mode The mode to calculate the arc cosecant in. 0 = radians (default), 1 = degrees, 2 = gradians.
357
+ *
358
+ * @return The arc cosecant of the number.
359
+ */
360
+ std::string acsc (const std::string& x, int decimals, int mode = 0 );
361
+
362
+ /* *
363
+ * @brief Calculates the arc cotangent of a number.
364
+ *
365
+ * @param x The number to calculate the arc cotangent of.
366
+ * @param decimals The number of decimal places to round off to.
367
+ * @param mode The mode to calculate the arc cotangent in. 0 = radians (default), 1 = degrees, 2 = gradians.
368
+ *
369
+ * @return The arc cotangent of the number.
370
+ */
371
+ std::string acot (const std::string& x, int decimals, int mode = 0 );
372
+
225
373
/* *
226
374
* @brief Executes a given predicate function a specified number of times.
227
375
*
0 commit comments