Changeset 58e7b26 in mainline for uspace/lib/math/generic/trig.c


Ignore:
Timestamp:
2018-08-31T19:10:47Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be34d6f
Parents:
bbe5e34
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-04-20 18:54:48)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-31 19:10:47)
Message:

Make uspace hosted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/math/generic/trig.c

    rbbe5e34 r58e7b26  
    371371}
    372372
     373void sincosf(float x, float *s, float *c)
     374{
     375        float base_arg = fmodf(x, 2 * M_PI);
     376
     377        if (base_arg < 0) {
     378                *s = -base_sin_32(-base_arg);
     379                *c = base_cos_32(-base_arg);
     380        } else {
     381                *s = base_sin_32(base_arg);
     382                *c = base_cos_32(base_arg);
     383        }
     384}
     385
     386void sincos(double x, double *s, double *c)
     387{
     388        double base_arg = fmod(x, 2 * M_PI);
     389
     390        if (base_arg < 0) {
     391                *s = -base_sin_64(-base_arg);
     392                *c = base_cos_64(-base_arg);
     393        } else {
     394                *s = base_sin_64(base_arg);
     395                *c = base_cos_64(base_arg);
     396        }
     397}
     398
    373399/** @}
    374400 */
Note: See TracChangeset for help on using the changeset viewer.