Panda3D
Functions
cmath.h File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "dtoolbase.h"
#include <cmath>
#include <cfloat>
#include <limits>
#include "cmath.I"

Go to the source code of this file.

Functions

float cabs (float v)
 
double cabs (double v)
 
float cacos (float v)
 
double cacos (double v)
 
float casin (float v)
 
double casin (double v)
 
float catan (float v)
 
double catan (double v)
 
float catan2 (float y, float x)
 
double catan2 (double y, double x)
 
double cceil (double f)
 
float ccos (float v)
 
double ccos (double v)
 
double cfloor (double f)
 
double cfrac (double f)
 Returns the fractional component of f: f - cfloor(f). More...
 
bool cinf (float v)
 
bool cinf (double v)
 
float cmod (float x, float y)
 This is similar to fmod(), but it behaves properly when x is negative: that is, it always returns a value in the range [0, y), assuming y is positive. More...
 
double cmod (double x, double y)
 This is similar to fmod(), but it behaves properly when x is negative: that is, it always returns a value in the range [0, y), assuming y is positive. More...
 
int cmod (int x, int y)
 This is similar to fmod(), but it behaves properly when x is negative: that is, it always returns a value in the range [0, y), assuming y is positive. More...
 
bool cnan (float v)
 
bool cnan (double v)
 
float cpow (float x, float y)
 
double cpow (double x, double y)
 
int cpow (int x, int y)
 
float csin (float v)
 
double csin (double v)
 
float csin_over_x (float v)
 Computes sin(x) / x, well-behaved as x approaches 0. More...
 
void csincos (float v, float *sin_result, float *cos_result)
 
void csincos (double v, double *sin_result, double *cos_result)
 
float csqrt (float v)
 
double csqrt (double v)
 
float ctan (float v)
 
double ctan (double v)
 
float make_inf (float)
 
double make_inf (double)
 
float make_nan (float)
 
double make_nan (double)
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2000-05-19

Definition in file cmath.h.

Function Documentation

◆ cfrac()

double cfrac ( double  f)
inline

Returns the fractional component of f: f - cfloor(f).

Definition at line 183 of file cmath.I.

◆ cmod() [1/3]

float cmod ( float  x,
float  y 
)
inline

This is similar to fmod(), but it behaves properly when x is negative: that is, it always returns a value in the range [0, y), assuming y is positive.

Definition at line 130 of file cmath.I.

◆ cmod() [2/3]

double cmod ( double  x,
double  y 
)
inline

This is similar to fmod(), but it behaves properly when x is negative: that is, it always returns a value in the range [0, y), assuming y is positive.

Definition at line 297 of file cmath.I.

◆ cmod() [3/3]

int cmod ( int  x,
int  y 
)
inline

This is similar to fmod(), but it behaves properly when x is negative: that is, it always returns a value in the range [0, y), assuming y is positive.

This integer-valued function is provided since the built-in modulo operator % does not work properly for negative x.

Definition at line 434 of file cmath.I.

◆ csin_over_x()

float csin_over_x ( float  v)
inline

Computes sin(x) / x, well-behaved as x approaches 0.

Definition at line 77 of file cmath.I.