home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************
- CALUSRF.C
- ¬⌐┼v (C) 1988-1992 Autodesk ñ╜Ñq
-
- Ñ╗╡{ªíñwÑ╤ Autodesk ñ╜Ñq╡∙ÑU¬⌐┼v, ╢╚⌐≤ñU¡z▒í¬pñUÑi▒┬╗P▒zíu│\ÑiívíC
- ╗╒ñUñú▒oÑHÑ⌠ª≤º╬ªí╡oªµ⌐╬ÑX¬⌐ª╣╡{ªí¬║íu¡∞⌐l╜Xív; ª²ñ╣│\▒zªb»S⌐w¡lÑ═
- ¬║ñuº@ñW╡▓ªXª╣╡{ªí¬║íuÑ╪¬║╜Xív¿╧Ñ╬íCª│├÷│o├■¡lÑ═ñuº@¬║▒°Ñ≤ªpñU:
-
- ( i) │]¡pñW╗Pñuº@ñW¼╥»┬║Θ░w╣∩ Autodesk ñ╜Ñq¬║▓ú½~íC
- (ii) ╕ⁿª│íu¬⌐┼v (C) 1988-1992 Autodesk ñ╜Ñqív¬║¬⌐┼v│qºiíC
-
-
-
- AUTODESKñ╜Ñq┤ú¿╤ª╣╡{ªí╢╚¿╤º@íu├■ªⁿív¬║░╤ª╥, ª╙ÑBñú▒╞░úª│Ñ⌠ª≤┐∙╗~¬║
- Ñi»αíCAUTODESKñ╜Ñq»Sª╣º_╗{Ñ⌠ª≤»S⌐wÑ╬│~ñº╛A║┘⌐╩, ÑHñ╬░╙╖~╛P░Γ⌐╥┴⌠ºt
- ÑX¿π¬║½O├╥íCAUTODESKñ╜ÑqªP«╔ÑτñúÑX¿πª╣╡{ªí░⌡ªµ«╔ñ@⌐wñú╖|íuññ┬_ív⌐╬
- íuº╣Ñ■╡L╗~ív¬║½O├╥íC
-
-
- Description: The user-defined functions for the Geometry Calculator.
-
- *****************************************************************************/
-
-
- /****************************************************************************/
- /* INCLUDES */
- /****************************************************************************/
-
- #include "cal.h"
-
-
- /****************************************************************************/
- /*.doc cal_MAX_func(internal)*/
- /*+
- Calculator function which returns maximum from a given set of numbers.
- -*/
- /****************************************************************************/
-
-
- static void
- /*FCN*/cal_MAX_func()
- {
- int i;
- double max;
- value_type type;
-
- if (no_of_params < 2) {
- error(0, "íuMAX Ñ\134»α¿τªíívª▄ñ╓╗▌¡n 2 ╢╡░╤╝╞");
- return;
- }
-
- max = -1e30;
- type = int_type;
-
- for (i=0; i<no_of_params; i++) {
- if (!IS_REAL(i)) {
- error(0, "íuMAX Ñ\134»α¿τªíívÑu╗▌¡n 1 ╢╡íu╣Ω╝╞ív⌐╬íu╛π╝╞ív░╤╝╞");
- return;
- }
- if (params[i].type == real_type) {
- type = real_type;
- }
- if (params[i].r > max) {
- max = params[i].r;
- }
- } /*for*/
-
- result.type = type;
- result.r = max;
-
- } /*cal_MAX_func*/
-
-
- /****************************************************************************/
- /*.doc cal_register_user_functions(external)*/
- /*+
- Insert the registration of all your calculator functions into the
- following function. The example how to do is, we hope, selfexplanatory.
- -*/
- /****************************************************************************/
-
-
- void
- /*FCN*/cal_register_user_functions()
- {
- cal_register_function("MAX", cal_MAX_func);
-
- /* Add registering your own functions here.... */
-
- } /*cal_register_user_functions*/
-
-