MCPcopy Index your code
hub / github.com/endbasic/endbasic / add_all

Function add_all

std/src/numerics.rs:1141–1167  ·  view source on GitHub ↗

Adds all symbols provided by this module to the given `machine`.

(machine: &mut MachineBuilder)

Source from the content-addressed store, hash-verified

1139
1140/// Adds all symbols provided by this module to the given `machine`.
1141pub fn add_all(machine: &mut MachineBuilder) {
1142 let angle_mode = Rc::from(RefCell::from(AngleMode::Radians));
1143 let prng = Rc::from(RefCell::from(Prng::new_from_entryopy()));
1144 machine.add_clearable(Box::from(ClearableAngleMode { angle_mode: angle_mode.clone() }));
1145 machine.add_callable(AbsFunction::new());
1146 machine.add_callable(AcosFunction::new(angle_mode.clone()));
1147 machine.add_callable(AsinFunction::new(angle_mode.clone()));
1148 machine.add_callable(AtnFunction::new(angle_mode.clone()));
1149 machine.add_callable(CintFunction::new());
1150 machine.add_callable(CosFunction::new(angle_mode.clone()));
1151 machine.add_callable(DegCommand::new(angle_mode.clone()));
1152 machine.add_callable(ExpFunction::new());
1153 machine.add_callable(FixFunction::new());
1154 machine.add_callable(IntFunction::new());
1155 machine.add_callable(LogFunction::new());
1156 machine.add_callable(MaxFunction::new());
1157 machine.add_callable(MinFunction::new());
1158 machine.add_callable(PiFunction::new());
1159 machine.add_callable(RadCommand::new(angle_mode.clone()));
1160 machine.add_callable(RandomizeCommand::new(prng.clone()));
1161 machine.add_callable(RndFunction::new(prng));
1162 machine.add_callable(RoundFunction::new());
1163 machine.add_callable(SgnFunction::new());
1164 machine.add_callable(SinFunction::new(angle_mode.clone()));
1165 machine.add_callable(SqrFunction::new());
1166 machine.add_callable(TanFunction::new(angle_mode));
1167}
1168
1169#[cfg(test)]
1170mod tests {

Callers

nothing calls this directly

Calls 2

add_clearableMethod · 0.80
add_callableMethod · 0.45

Tested by

no test coverage detected