Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Relevant replacement documents include:
PublicUtility/CAMath.h
/* |
<codex> |
<abstract>Part of CoreAudio Utility Classes</abstract> |
<\codex> |
*/ |
#ifndef __CAMath_h__ |
#define __CAMath_h__ |
#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) |
#include <CoreAudio/CoreAudioTypes.h> |
#else |
#include <CoreAudioTypes.h> |
#endif |
inline bool fiszero(Float64 f) { return (f == 0.); } |
inline bool fiszero(Float32 f) { return (f == 0.f); } |
inline bool fnonzero(Float64 f) { return !fiszero(f); } |
inline bool fnonzero(Float32 f) { return !fiszero(f); } |
inline bool fequal(const Float64 &a, const Float64 &b) { return a == b; } |
inline bool fequal(const Float32 &a, const Float32 &b) { return a == b; } |
inline bool fnotequal(const Float64 &a, const Float64 &b) { return !fequal(a, b); } |
inline bool fnotequal(const Float32 &a, const Float32 &b) { return !fequal(a, b); } |
#endif // __CAMath_h__ |
Copyright © 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-10-08