MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / mul

Method mul

src/Bullet3Geometry/b3ConvexHullComputer.cpp:857–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855}
856
857b3ConvexHullInternal::Int128 b3ConvexHullInternal::Int128::mul(btInt64_t a, btInt64_t b)
858{
859 Int128 result;
860
861#ifdef USE_X86_64_ASM
862 __asm__("imulq %[b]"
863 : "=a"(result.low), "=d"(result.high)
864 : "0"(a), [b] "r"(b)
865 : "cc");
866 return result;
867
868#else
869 bool negative = a < 0;
870 if (negative)
871 {
872 a = -a;
873 }
874 if (b < 0)
875 {
876 negative = !negative;
877 b = -b;
878 }
879 DMul<btUint64_t, btUint32_t>::mul((btUint64_t)a, (btUint64_t)b, result.low, result.high);
880 return negative ? -result : result;
881#endif
882}
883
884b3ConvexHullInternal::Int128 b3ConvexHullInternal::Int128::mul(btUint64_t a, btUint64_t b)
885{

Callers

nothing calls this directly

Calls 1

mulFunction · 0.50

Tested by

no test coverage detected