2023-03-28 23:55:57 +03:00
|
|
|
// Copyright (c) 2019-2023 Alexander Medvednikov. All rights reserved.
|
2021-12-07 11:14:30 +03:00
|
|
|
// Use of this source code is governed by an MIT license
|
|
|
|
// that can be found in the LICENSE file.
|
|
|
|
module stbi
|
|
|
|
|
2022-03-06 20:01:22 +03:00
|
|
|
// Note: stbi uses math.h because of `ldexp` and `pow`, for which we *do* have
|
2021-12-07 11:14:30 +03:00
|
|
|
// pure V implementations, but our `math` module still depends on libm
|
|
|
|
// because of 'powf', 'cosf', 'sinf', 'sqrtf' and 'tanf'.
|
|
|
|
|
|
|
|
// TODO: remove this file, when we have pure V implementations for the above
|
|
|
|
// functions too, and so `math` is no longer dependent on `libm` at all.
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
$if windows {
|
|
|
|
$if tinyc {
|
|
|
|
#flag @VEXEROOT/thirdparty/tcc/lib/openlibm.o
|
|
|
|
}
|
|
|
|
} $else {
|
|
|
|
#flag -lm
|
|
|
|
}
|