---
name: "math.c"
section: "3caca"
platform: "linux"
package: "libcaca-dev"
version: "0.9-4"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/math.c"
---

# math.c(3caca)

Math.

## NAME

math.c - Math.

## SYNOPSIS

### Functions

int **caca\_rand** (int min, int max)\
 *Generate a random integer within a range.*  unsigned int **caca\_sqrt** (unsigned int a)\
 *Approximate a square root, using Newton's method to avoid costly floating point calculations.*

## Detailed Description

**Version:**

$Id: **math.c** 195 2003-12-31 14:21:08Z sam $

**Author:**

Sam Hocevar \<sam@zoy.org\>

This file contains simple mathematical routines.

## Author

Generated automatically by Doxygen for libcaca from the source code.
