brintos

brintos / llvm-project-archived public Read only

0
0
Text · 951 B · f1dd021 Raw
40 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// <math.h>10 11// [support.c.headers.other]/112//   ... except for the functions described in [sf.cmath], the13//   std::lerp function overloads ([c.math.lerp]) ...14 15#include <cassert>16#include <math.h>17 18template <class = int>19int lerp(float, float, float) {20  return 32;21}22 23template <class = int>24int lerp(double, double, double) {25  return 32;26}27 28template <class = int>29int lerp(long double, long double, long double) {30  return 32;31}32 33int main(int, char**) {34  assert(lerp(0.f, 0.f, 0.f) == 32);35  assert(lerp(0., 0., 0.) == 32);36  assert(lerp(0.l, 0.l, 0.l) == 32);37 38  return 0;39}40