MCPcopy Index your code
hub / github.com/processing/p5.js / castToFloat

Function castToFloat

src/strands/ir_builders.js:329–345  ·  view source on GitHub ↗
(strandsContext, dep)

Source from the content-addressed store, hash-verified

327}
328
329export function castToFloat(strandsContext, dep) {
330 const { id, dimension } = functionCallNode(
331 strandsContext,
332 strandsContext.backend.getTypeName('float', dep.typeInfo().dimension),
333 [dep],
334 {
335 overloads: [{
336 params: [dep.typeInfo()],
337 returnType: {
338 ...dep.typeInfo(),
339 baseType: BaseType.FLOAT,
340 },
341 }],
342 }
343 );
344 return createStrandsNode(id, dimension, strandsContext);
345}
346
347export function structConstructorNode(strandsContext, structTypeInfo, rawUserArgs) {
348 const { cfg, dag } = strandsContext;

Callers 1

primitiveConstructorNodeFunction · 0.85

Calls 3

createStrandsNodeFunction · 0.90
functionCallNodeFunction · 0.85
typeInfoMethod · 0.80

Tested by

no test coverage detected